fslaborg / FsSpreadsheet

Spreadsheet creation and manipulation in F#, Javascript, and Python.
http://fslab.org/FsSpreadsheet/
MIT License
27 stars 1 forks source link

[Feature Request] Table api is very obscure #48

Open Freymaurer opened 1 year ago

Freymaurer commented 1 year ago

Without any documentation the table api seems impossible to navigate, as it does not use any common vocabularies from spreadsheet manipulation.

image

What is a field?

image

Why is this not AddCell (same for worksheet.Table)? Why is there no "GetCell", even if i need to pass an additional cellcollection.

image

Why can i access HeaderRow, but not body?

In addition #45

omaus commented 1 year ago

Why is this not AddCell (same for worksheet.Table)? Why is there no "GetCell", even if i need to pass an additional cellcollection.

Because the functionality is taken from spiritual role model ClosedXML which names it the same. .Cell is .GetCell if at given position a cell is present or .AddCell if it is not. I too am not happy about this naming (and would prefer .GetOrAddCell) but this is up to debate with other library contributors.

image

Why can i access HeaderRow, but not body?

Again, because there's no equivalent in ClosedXML. In addition, there is no equivalent in MS Excel. It does not differentiate between header and body. There is only the full table and, as a subset, the header row.

image

What is a field?

A TableField. Again a class derived from ClosedXML's pendant which is defined as a header cell and its data cells. "TableField" is a strange name, "TableColumn" would make more sense to me but blame the ClosedXML guys for this. 😂

Freymaurer commented 1 year ago

In addition, there is no equivalent in MS Excel. It does not differentiate between header and body.

Even if that is true, the api contains the HeaderRow property and office-js gives extensive api functions for both header and body.

A TableField. Again a class derived from ClosedXML's pendant which is defined as a header cell and its data cells. "TableField" is a strange name, "TableColumn" would make more sense to me but blame the ClosedXML guys for this. 😂

This is a bad reason in my opinion. Why not improve f# wrapper api over ClosedXML/OpenXML api.

omaus commented 1 year ago

In addition, there is no equivalent in MS Excel. It does not differentiate between header and body.

Even if that is true, the api contains the HeaderRow property and office-js gives extensive api functions for both header and body.

office-js also seems superior to OpenXML to me.

A TableField. Again a class derived from ClosedXML's pendant which is defined as a header cell and its data cells. "TableField" is a strange name, "TableColumn" would make more sense to me but blame the ClosedXML guys for this. 😂

This is a bad reason in my opinion. Why not improve f# wrapper api over ClosedXML/OpenXML api.

You know how it is, everything must be done quickly and therefore you end up that way. 😅

Freymaurer commented 1 year ago

Then please take this issue not as [Discussion] but as [Feature Request]. Be it for a more clear api, ore api functions or documentation.