Highlighted

cfspreadsheet : Issue while reading Excel sheet (xls/xlsx) created from Microsoft Office 2013

New Here ,
Aug 07, 2014

Copy link to clipboard

Copied

I am facing an Issue while reading Excel sheet (xls/xlsx) created from Microsoft Office 2013.

Here is the error
#1: An error occurred while reading the Excel: org.apache.poi.EncryptedDocumentException: The supplied spreadsheet seems to be an Encrypted .xlsx file. It must be decrypted before use by XSSF, it cannot be used by HSSF.

#2: An error occurred while reading the Excel: org.apache.poi.hssf.record.RecordFormatException: Unknown encryption info 4.

I tried with CF9 and CF10. Found same error on both versions.
Also, I updated POI jar files with updated POI 3.10 but no luck.

Followed these links :
https://issues.apache.org/bugzilla/show_bug.cgi?id=56564
https://issues.apache.org/bugzilla/show_bug.cgi?id=35897

Any help will be appreciated. Tx

Views

995

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

cfspreadsheet : Issue while reading Excel sheet (xls/xlsx) created from Microsoft Office 2013

New Here ,
Aug 07, 2014

Copy link to clipboard

Copied

I am facing an Issue while reading Excel sheet (xls/xlsx) created from Microsoft Office 2013.

Here is the error
#1: An error occurred while reading the Excel: org.apache.poi.EncryptedDocumentException: The supplied spreadsheet seems to be an Encrypted .xlsx file. It must be decrypted before use by XSSF, it cannot be used by HSSF.

#2: An error occurred while reading the Excel: org.apache.poi.hssf.record.RecordFormatException: Unknown encryption info 4.

I tried with CF9 and CF10. Found same error on both versions.
Also, I updated POI jar files with updated POI 3.10 but no luck.

Followed these links :
https://issues.apache.org/bugzilla/show_bug.cgi?id=56564
https://issues.apache.org/bugzilla/show_bug.cgi?id=35897

Any help will be appreciated. Tx

Views

996

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 07, 2014 0
Adobe Employee ,
Aug 07, 2014

Copy link to clipboard

Copied

Do you have a sample code to share?


Regards,

Anit Kumar

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 07, 2014 0
New Here ,
Aug 08, 2014

Copy link to clipboard

Copied

<cftry>

<cfspreadsheet action="read"

  src="E:\FromD\Test Codes\POIUtility.cfc-master\examples\CFSI_CMRT3-01 (2).xlsx"

  name="SpreadsheetObj">

</cfspreadsheet>

<cfdump var="#SpreadsheetInfo(spreadsheetobj)#">

<cfcatch><cfdump var="#cfcatch#"></cfcatch>

</cftry><cfabort>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 08, 2014 0
New Here ,
Aug 08, 2014

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 08, 2014 0
Adobe Employee ,
Aug 08, 2014

Copy link to clipboard

Copied

I can run the code with ColdFusion 9 and ColdFusion 10. Here's the Output tested with Excel created in 2013.

Capture.JPG

Can you test the sample code

Dropbox - testSpreadsheet.xlsx

Dropbox - cfspreadsheet_db.cfm

Regards,

Anit Kumar

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 08, 2014 0
shamCF LATEST
New Here ,
Aug 25, 2014

Copy link to clipboard

Copied

Hi Anit,

Did you try with XLSX uploaded over here ?
dropbox.com/s/0879kn0da6aoqou/CFSI_CMRT3-01%20(2).xls

Also we are facing more issues while reading excel sheets (XLS) -

1.java.lang.NullPointerException at org.apache.poi.hssf.model.LinkTable.getExternalBookAndSheetName

2.Duplicate PageSettingsBlock record (sid=0x89c)

3.The supplied POIFSFileSystem does not contain a BIFF8 'Workbook' entry

Please let me know your findings ?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 25, 2014 0