Page 1 of 1

Export to XLS

Posted: Tue May 03, 2016 2:51 pm
by NicolasM
Hi,

I need your help again for a new export!

I want to export BO data (C#) to XLS file, by using the same MRT model than for print.

My first problem must be into my MRT file. I have empty lines between 2 lines. If I take a look in the print preview window, I can see these lines too. Is there a problem with my MRT file? I attach CSV and MRT file.

My second problem is the big space between my table and the footer in the CSV file. Can I change that without change anything when try to print?

Thanks in advance for any help!
Nicolas

Re: Export to XLS

Posted: Wed May 04, 2016 1:31 pm
by NicolasM
Hi,

I try to export to XLS file your "Simple Table" example with your "Demo" project. I add following code before "report.Design();" in the "btDesign_Click" (StiDemoForm.cs):

Code: Select all

            // Get filepath
            string filepath = GetFilePath("XLS File|*.xls");
            if (filepath != "")
            {
                 StiExcelExportSettings settings = new StiExcelExportSettings();
                 settings.UseOnePageHeaderAndFooter = true;

                 // Export document
                 report.ExportDocument(StiExportFormat.Excel, filepath, settings);

                 // Open document
                 System.Diagnostics.Process.Start(filepath);
            }
I doing this to test XLS export and see if empty lines was added. But with this code, XLS file cannont be open, Excel says the file is corrupted. Is there a problem with Table on export?

Thanks in advance for any help,
Nicolas

Re: Export to XLS

Posted: Wed May 04, 2016 2:34 pm
by HighAley
Hello, Nicolas.

Sorry, but we can't reproduce your issue with additional lines in Excel without data.
Please, send us sample data for your report.

If you need to remove empty space you should rebuild the report. Do you need to print the Footer on the bottom of the page?

Thank you.

Re: Export to XLS

Posted: Fri May 06, 2016 6:22 am
by NicolasM
Hello HighAley,

Thank you for your answer!

I will send you a external project with data next monday (I'm not at office today). But can you reproduce the export problem on your "Demo" project?

Rebuild the report? Well, I just build it but I will try this. For the Footer, is it possible to don't print it? Can you tell me how, please?

Thank you,
Nicolas

Re: Export to XLS

Posted: Fri May 06, 2016 12:55 pm
by HighAley
Hello, Nicolas.

Our product is designed to show, print and export the reports as is.
The main target of our product to print and export exactly the same that you see in the Viewer.
If you need to get different report on printing and exporting, it should be different reports.

But there are some features that can help you. There is a Printable property of all components that you could set to False and the component will not be printed.
The position of all rest components be the same as in Viewer.

Also it possible to use the Printing and Exporting events of the report where you could change the report as you need.
You could write code there that will change the report or event load the different report template, render it and pass it further.

We are waiting for a sample that will help us to reproduce the issue with extra lines in Excel.

Thank you.

Re: Export to XLS

Posted: Mon May 09, 2016 7:14 am
by NicolasM
Hello HighAley,

Thank you for this information. It's will be very useful for me!

I start working on a new software to show you my problem with Excel. When finished, I send it by email to Stimulsoft Support Team.

Thank you,
Nicolas

Re: Export to XLS

Posted: Mon May 09, 2016 7:24 am
by Alex K.
Hello,

Ok.
Please let us know if you need any additional help.

Thank you.