EPPlus Excel file Opening error - excel

I am using EPPlus open source tool for open excel files on server.
When I try to open it using EPPlus some time I am getting error. Then I download it to local machine & when I open it using MS Excel I got error like excel found unreadable content Do you want to recover workbook?
I repair it using MS Excel again upload it and then it start working correctly.
What is actual problem?
Can I reapair it using EPPlus itself?

Try with new version of EPPlus
EPPlus 4.0 fixed mostly bugs
Save() and Dispose() created instance of excelPackage for better performance

Related

When report was downloaded from the Oracle ebs Excel report.While I am trying to open it was generating an error

The file format and extension of 'Accounts.xls' don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?
It was generating this error while I am trying to open the downloaded excel report from the Oracle ebs
I don't know what to do
the Oracle EBS BI Publisher cannot create real xlsx Excel output files and generates and xml (xslt) format instead, which is given the extension xls to open automatically in Excel. Excel detects that the content does not match the expected binary xls format and shows the warning.
To avoid this problem, you can use third party products like blitz report.

TIBCO BW 5 Read Excel file

I would ask you if is there some way to read an excel file(.xls) using TIBCO BW 5.
Till now I'm made this in three different ways:
1: As convert excel file(.xls) to CSV file.
2: As .xls as an XML file
3: As custom Java code, that reads Excel files, using Apache library(Poi)
Unfortunately, there is no Excel plug-in for TIBCO BW 5. Or I cannot find it :(
Another way that I found, is that I could use Windows ODBC - everything is configured, but after I add the rt.jar file, still can not make a connection with TIBCO Designer.
Every time It throws this exception:
<>
Thank you in advance for your help.
On TIBCO BW 5.X projects the following solutions are commonly used:
1: Convert excel file(.xls) to CSV file.
3: Custom Java code, that reads Excel files, using Apache library(Poi)
In a BusinessWorks 6.X context you can use the EXCEL plugin that is using the apache POI library.
you need place that odbc jar in your Tibco_Home\tpcl\5.11\jdbc.
restart the designer.
Note:-if there is no jdbc folder create it
Unfortunately, there is no Excel plug-in for TIBCO BW 5. Or I cannot find it :(
It's there: https://docs.tibco.com/products/tibco-activematrix-businessworks-plug-in-for-microsoft-excel-6-1-1
Once you import the Excel plug-in into your project, you could simply use the "Excel Read" activity, passing the excel file you want to read. The plugin also provides you a lot of other excel-related functions.

How to save .xls file using OpenXML in dot net core?

I want to create a .xls file using OpenXML SDK. I am able to create .xlsx and .xlsm files but when i save it as .xls and open in my system it pops an error. Then I have to do save as again for it to work properly.
Is there any way to save files directly in .xls format?
Simple answer is No, you cannot do it.
The reason being .xls format is proprietary to Microsoft. OpenXml SDK cannot understand or write to that format.
If you want to store data in .xls format, then you need to use Microsoft office excel interop objects.
Excel namespace interop
If you indeed want to take the route of adding interops to your application to save to .xls format, I would also suggest you to look into following SO answer because adding reference to interop objects in .NET core is not straight forward.
ms interop in .net core

Office Invalid XML error, file still opens in Office

I have an .xlsx file that when run through the open Office SDK 2.5 generates an error that the document is invalid and contains multiple validation errors involving the slicerCache and invalid attribute values.
I can attach more information about the actual XML if needed from the xlsx file, however my question is actually this. Excel still opens the document without an error. Not even a request to "repair" the document.
I am curious why using the Microsoft open office XML SDK generates validation errors, yet office is still able to open these documents.
Does office make a best guess? Or is the SDK given by microsoft not entirely accurate??
Thanks.
This is a formatting issue as far as I can tell. When you save it in xlsx it saves it as a workbook, not a spreadsheet. I would save it in a different file format or see if there libraries that your sdk needs in order to process the xlsx. I've never worked with office sdk, but I get similar errors when I open xlsx in other programs. 99% of the time I can just change the format. (if you live dangerously you can just manual change the file extension in your folder to something itll read.)

Open XML Make excel viewable

I'm using Open XML to open an excel file as in:
using (SpreadsheetDocument myWorkbook = SpreadsheetDocument.Open("generated.xlsx", true))
...
but I cannot figure out how to actually launch excel and show the file through code.
Thanks for any help.
Take a look at either one of these answers:
how to create and download excel document using asp.net
OpenXML file download without temporary file

Resources