Layout problem with export to Excel

Stimulsoft Reports.WEB discussion
Post Reply
Scottioioio
Posts: 47
Joined: Thu Dec 20, 2012 6:58 pm

Layout problem with export to Excel

Post by Scottioioio »

I have a report that I need to export to Excel. The report is very simple, it's just a table that's bound to a data source (which is bound to a database query). The table has 16 columns and usually around 100 rows. I have the report configured to use a page size of C Sheet set in Landscape mode (22"x17").

I can view the report just great when visiting a web page using the StiWebViewer Web control. However, when I go to export it - Save --> Microsoft Excel 2007/2013 - when it exports it it seems to add 16 columns to the Excel output for every page in the report. (I'm using the "Use One Page Header and Footer" option when exporting.)

I've attached two spreadsheets. The first one shows the results for a two-page report. In the report, it shows the first seven records on page 1, and the remaining four on page 2. As you can see in the Excel export, the columns for records 1-7 line up nicely, but the columns for records 8-11 have a different alignment from the first seven. It appears as though the rows in the Excel spreadsheet for each page in the report have their own alignment. I don't want this, I want all records to have the same columns and column widths so everything lines up.

I'm also attaching a spreadsheet when exporting using the "Export Each Page to Sheet" option. With this option each sheet has exactly 16 columns and they're all aligned. This is great, but I need all of the data on a single sheet.

How do I accomplish this?

Thanks
Attachments
Report-EachPageOnNewSheet.xlsx
Report with each page on separate sheet
(8.91 KiB) Downloaded 271 times
Report.xlsx
Report with misaligned columns
(10.2 KiB) Downloaded 258 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Layout problem with export to Excel

Post by HighAley »

Hello.

Without your report template we can only guess how to solve your problem.
It seems that you use StiTable. Then you should set its the Auto Width property to Table.

Thank you
Scottioioio
Posts: 47
Joined: Thu Dec 20, 2012 6:58 pm

Re: Layout problem with export to Excel

Post by Scottioioio »

I had the table's Auto Width property set to Page. Setting it to Table did the trick - thanks.
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: Layout problem with export to Excel

Post by Andrew »

Hello,

Great!

Have a nice weekend!
Post Reply