I keep getting that my file is: "This file's format is not supported or you don't specify a correct format."
The file is coming in from a Vendor that I'm trying to do some automation against, so I can't control the source. The file extension is XLS, but even my Excel says something is funky with it (Excel opens with warning). After messing around for a while, it turns out it is an Office 12 XML Spreadsheet, apparently misnamed to XLS. If I rename to .XML and open in Excel it opens clean.
- Code: Select all
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook
xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas- microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
xmlns:html="http://www.w3.org/TR/REC-html40">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Version>12.00</Version>
</DocumentProperties>
So, I've gone back and forth numerous scenarios, both file extensions, various configs in Spire like setting Workbook.Version set to 2007, with no luck. I also tried load from XML, and various other combinations and always get that the format is wrong. When I try to load from XML, it says data at root element 1 is wrong, so i'm guessing it's expecting different XML than what I'm trying to do.
Is this supported somehow in the product?
Also, excuse me, I'm not the best dev. I'm a PM that can write a little code here and there.