Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Issue #308 - Excel file details #410

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

pranav700
Copy link

Supports .Net45 and .NetStandard20 only

@andersnm
Copy link
Collaborator

Hi,

Thanks, but this will require some changes to be accepted. The code adds an overload of the CreateOpenXmlReader factory method which returns only the creator field. This does not fit so well within the general design of the library.

Here are some suggestions how to implement this feature:

  • The creator should be added as a new property on the IExcelDataReader interface
  • The property must be added and "wired up" through the internal ExcelDataReader class and IWorkbook interface
  • The property should ideally be implemented in both the XlsxWorkbook and XlsWorkbook classes (also CsvWorkbook, but can return null)

For XSLX:

  • Add a helper in the ZipWorker class to return the stream for docProps/core.xml, named like GetDocPropsStream(). This is pretty much the same code as the other Get*Stream() helpers
  • Then, add helpers in the XlsxWorkbook class to parse the stream and extract the creator, named like ReadDocProps(). This is similar code to the other Read*() helpers
  • There should be tests for XLSXes where docProps/core.xml both is present and absent

For XLS:

  • There needs to be a new XlsBiffWriteAccess class which parses the author string out of the BIFF record described in "2.4.349 WriteAccess"
  • Then, the XlsBiffStream class must support the new BIFF record
  • Then, add code in XlsWorkbook.ReadWorkbookGlobals to extract the creator field
  • There should be tests for all BIFF versions (only important if the string layout differs, but I didnt check)

If you want to focus only on XLSX for now, then that's fine. It is easier to implement for XLS later once the initial plumbing work has been done :)

@pranav700
Copy link
Author

pranav700 commented May 20, 2019

thanks for the review, I'll make some changes as per the design of the library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants