Forum Discussion
Getting data from current sheet not working with excel.CurrentWorkbook()
- 3 years ago
Is that table actually formatted as an Excel table (see https://support.microsoft.com/en-us/office/overview-of-excel-tables-7ab0bb7d-3a9e-4b56-a3c9-6c94334e492c)? That should be your first step. Once you have done that you will be able to connect to it using Excel.CurrentWorkbook(). For example, if you have a table in your workbook called MyTable, the following M code will return the data from it:
Excel.CurrentWorkbook(){[Name="MyTable"]}[Content]
Ah understood, so is it not possible to to point to a table in this sheet then, which is what I want to do. There is a single table in my sheet, and I would like to use that single table as a source, and later append it to another table from another sheet. The link here mentions what you are saying, but I am afraid I am still lost about how I can point to that table so that the file will allow my colleagues to just change the data in table when they want, keeping the field names the same and update it.
Is that table actually formatted as an Excel table (see https://support.microsoft.com/en-us/office/overview-of-excel-tables-7ab0bb7d-3a9e-4b56-a3c9-6c94334e492c)? That should be your first step. Once you have done that you will be able to connect to it using Excel.CurrentWorkbook(). For example, if you have a table in your workbook called MyTable, the following M code will return the data from it:
Excel.CurrentWorkbook(){[Name="MyTable"]}[Content]
- Anonymous3 years agoNot applicable
I was able to do it using this, thanks a million for the help!