0

I need to create a table in Microsoft Excel using Graph API.

https://learn.microsoft.com/en-us/graph/api/worksheet-post-tables?view=graph-rest-1.0

As per above document, if we set hasHeaders field as false in the create table API, it should create a table without headers. But still, I'm getting a table with headers. I added the screenshot below. enter image description here

So how can create a table without headers in Excel?

Shanan
  • 112
  • 1
  • 8

1 Answers1

2

If I read the documentation correctly, even if your source does not have headers, Excel will create headers automatically: enter image description here

After you create your table, you would need to Update the WorkbookTable object that you created, and set ShowHeaders to False https://learn.microsoft.com/en-us/graph/api/table-update?view=graph-rest-1.0&tabs=http

Dragan Panjkov
  • 4,302
  • 4
  • 28
  • 26
  • Thanks. Does `hasHeaders` have any specific thing to do? Seems it is a redundant field in the payload. – Shanan Jun 04 '21 at 05:32
  • I am not sure, but my guess would be that it is required by the underlying Excel Online API that sits behind Microsoft Graph call. – Dragan Panjkov Jun 04 '21 at 17:30