XML to XLS conversion

Technical support for Spire.XLS

Moderators: iceblue support, Flash, Manager

XML to XLS conversion

Postby eNTi » Thu Oct 07, 2010 8:20 am

hi.

i've been using sprire.xls for about a week now and have already tried to manually convert my xml files to xls, which was in fact pretty stupid. i realized, that you could just open the finished xml file and save it as xls and that's that. despite some minor format issues, it works pretty well.

my only problem now is the fact, that print settings are not converted. my original xml files are set up with the printing information included. in my particular case, i need my spreadsheets to be set to page fit, so that the whole information on one sheet is printed on one A1 page rather than split into two. is it somehow possible to include that in your conversion code, or do i have to do that manually?
eNTi
 
Posts: 2
Joined: Tue Sep 28, 2010 12:17 pm

Re: XML to XLS conversion

Postby Flash » Fri Oct 08, 2010 2:12 pm

Hello,

Thank you for your inquiry.
Please use following code to set page fit.

Code: Select all
   //Sets page setup properties
            sheet.PageSetup.Orientation = PageOrientationType.Landscape;
            sheet.PageSetup.PaperSize = PaperSizeType.PaperA3;

            //Sets page area
            sheet.PageSetup.PrintArea = "A1:B2";


Best Regards
User avatar
Flash
 
Posts: 56
Joined: Thu Jun 29, 2006 2:34 pm

Re: XML to XLS conversion

Postby eNTi » Sat Oct 09, 2010 3:44 pm

Flash wrote:Hello,

Thank you for your inquiry.
Please use following code to set page fit.

Code: Select all
   //Sets page setup properties
            sheet.PageSetup.Orientation = PageOrientationType.Landscape;
            sheet.PageSetup.PaperSize = PaperSizeType.PaperA3;

            //Sets page area
            sheet.PageSetup.PrintArea = "A1:B2";


Best Regards

well i do know about the sheet.PageSetup and already tried to use it, but that would mean i have to loop through all my worksheets in my workbook manually. also, the print areas are "hidden" in the xml. i'd have to write a parser and check for the right values and then translate them to the right format. this all means, i have to do that manually and write more code, even though all the information is already included in the xml. why don't you just convert that in your code?
eNTi
 
Posts: 2
Joined: Tue Sep 28, 2010 12:17 pm


Return to Spire.XLS

Who is online

Users browsing this forum: No registered users and 0 guests