.ods import lacks Workbook.Sheets property #3162

Closed
opened 2024-07-23 20:33:01 +00:00 by edemaine · 1 comment

When I import an xlsx file, I get a Workbook.Sheets property that in particular tells me which sheets are hidden.

When I import an ods file, I don't seem to get that information anywhere. The imported file looks like this:

{
  Sheets: {
    Sheet1: { A1: [Object], '!ref': 'A1' },
    Sheet_with_a_very_long_name: { '!ref': 'A1:A1' }
  },
  SheetNames: [ 'Sheet1', 'Sheet_with_a_very_long_name' ],
  Workbook: { Names: [], WBProps: {} },
  Props: { Author: 'Erik Demaine' },
  bookType: 'ods'
}

Inside the ods file's content.xml, I do see the relevant information:

<style:table-properties table:display="true" style:writing-mode="lr-tb"/></style:style>
<style:table-properties table:display="false" style:writing-mode="lr-tb"/></style:style>

Is it possible to determine which sheets are hidden for imported ods files?

When I import an xlsx file, I get a [`Workbook.Sheets` property](https://docs.sheetjs.com/docs/csf/book/#sheet-metadata) that in particular tells me which sheets are hidden. When I import an ods file, I don't seem to get that information anywhere. The imported file looks like this: ```js { Sheets: { Sheet1: { A1: [Object], '!ref': 'A1' }, Sheet_with_a_very_long_name: { '!ref': 'A1:A1' } }, SheetNames: [ 'Sheet1', 'Sheet_with_a_very_long_name' ], Workbook: { Names: [], WBProps: {} }, Props: { Author: 'Erik Demaine' }, bookType: 'ods' } ``` Inside the ods file's `content.xml`, I do see the relevant information: ```xml <style:table-properties table:display="true" style:writing-mode="lr-tb"/></style:style> <style:table-properties table:display="false" style:writing-mode="lr-tb"/></style:style> ``` Is it possible to determine which sheets are hidden for imported ods files?
Owner

Not at the moment. The "Sheet Visibility" page in the docs has a table listing the supported formats (click "File Format Support" to reveal the table):

Formats table

We will add support for ODS and look into the other formats before the next release.

Not at the moment. The ["Sheet Visibility"](https://docs.sheetjs.com/docs/csf/features/visibility) page in the docs has a table listing the supported formats (click "File Format Support" to reveal the table): ![Formats table](/attachments/d7c00c82-06f7-4a99-9bff-62e2ee201f9f) We will add support for ODS and look into the other formats before the next release.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#3162
No description provided.