XLSX in OfficeWriter 8.0
We just released OfficeWriter 8.0, and the biggest feature in this release is full support for Excel 2007/2010 files with the OfficeWriter API. So, if you’ve written OfficeWriter applications that process XLS files, what do you need to do to get started with using XLSX files? In short, nothing!
We took special care to keep compatibility in mind, so you can largely use the same code to process your XLSX files that you use with XLS. There are a couple scenarios in which you’ll need to be specific about what you’re using, but they’re mainly around creating new files where you clearly need to tell OfficeWriter what kind of files to create.
Creating New Workbooks
Use the Create method on an ExcelApplication instance to create a new, blank workbook. For back compat, calling Create with no arguments will create an Excel 2003 (XLS) file. To create an XLSX, pass it a FileFormat enum like this:
Workbook wb = xla.Create(ExcelApplication.FileFormat.Xlsx);
Opening Existing Workbooks
To open an existing workbook, you don’t have to do anything other than pass ExcelWriter a path to an XLSX file, or a System.IO.Stream instance that represents the file. There are no additional arguments to the Open method that require you to tell it what kind of file it is – we’ll figure it out.
Saving Workbooks
Since ExcelWriter knows what kind of file you’re working with. you also don’t need to tell it anything special when you go to save or stream the file. Just pass it an XLSX output file name, and it will save it as such.
How to Get OfficeWriter 8.0, and How to Learn More
To purchase OfficeWriter, contact SoftArtisans sales at 877-SOFTART x1 or contact@softartisans.com.
Existing customers with maintenance contracts can visit www.officewriter.com/product-updates to download OfficeWriter 8.0
Those who wish to evaluate the product can visit www.officewriter.com/trial to get a free 30-day, fully functional evaluation
Share the post "OfficeWriter 8.0: Getting Started with XLSX in C#"