AR11 - Export to Excel Number saved as Character

Posted by: sivagangakala on 24 September 2017, 8:13 pm EST

  • Posted 24 September 2017, 8:13 pm EST

    We have a report created in AR11, where when we try to export the report to excel using your APIs, the numbers in the report are saved as characters in the excel. One thing to note here is that the same is working fine if we have excel 2003, but see this problem only if we have excel 2013. Not sure if anything specific we have to do in our code base. Here is the code snippet i use to export to excel.

    GrapeCity.ActiveReports.Export.Excel.Section.XlsExport XLSEx = new GrapeCity.ActiveReports.Export.Excel.Section.XlsExport();

    this.WebRptViewer.Export(XLSEx, new System.IO.FileInfo(export_file_name));

    Also, in the report designer i have set the OutputFormat text box property to Number.

    Please suggest to proceed further on this.

    Thanks,

    Siva G.

  • Posted 26 September 2017, 2:16 am EST

    I could not reproduce the problem you’ve mentioned, at my end. On exporting a report with Number field, the numbers were saved as numbers with the correct format. Please see the Product column in the attached excel file.

    Kindly attach your application with which I can also reproduce the issue at my end. Also, I would recommend you to try the SP2 of ActiveReports 11, if you have an older version.

    Invoice.zip

  • Posted 26 September 2017, 3:46 pm EST

    Thanks for your reply.

    But in the example you attached itself, you could see that the Cell Nos R3, A9 and H9 are shown with a green mark in the top left corner of the cell indicating them as text even though they are numbers. I’m getting the same issue with my project as well.

    I’m not sure if you could use our project as it is tied to our application and you won’t be able to compile. But at a high level I just have a simple report with three text boxes in it. I have attached the excel file from my project which has the same issue that I described above from your example. Please help.

    Please rename the attached file from 12344.png to 12344.xlsx and open it.

    Thanks,

    Siva G.

  • Posted 26 September 2017, 3:49 pm EST

    I tried to attach the file by dragging and dropping it in the below area, but it is not attaching. Not sure any issue here. But as I mentioned i get the same issue that you could see in your attached file as mentioned in my above post.

  • Posted 26 September 2017, 9:02 pm EST

    Those two cells appear as text because the data type of those fields in the Database itself is ShortText. If the data type of a field is Number in the database, it will be exported as number once the OutputFormat property is set to Number. I have attached another excel file and the report as well for your reference. Please take a look.

  • Posted 26 September 2017, 9:04 pm EST

    Sorry, the zip file didn’t get attached. Have attached it now.Orders.zip

  • Posted 2 October 2017, 4:20 pm EST

    In my sample i don’t use any db columns. I just have three plain text boxes and hard-coded the values to some numbers to run the report. We have another project to view the report and to export to different formats. I have attached it here, which you could take a look and let me know if I’m missing anything here.

    I tried to attach the zip file but i got a message saying ‘You can’t upload files of this type’. Not sure what am I missing. Please let me know if I could send my file to your mail id directly.

  • Posted 2 October 2017, 4:20 pm EST

    In my sample i don’t use any db columns. I just have three plain text boxes and hard-coded the values to some numbers to run the report. We have another project to view the report and to export to different formats. I have attached it here, which you could take a look and let me know if I’m missing anything here.

    I tried to attach the zip file but i got a message saying ‘You can’t upload files of this type’. Not sure what am I missing. Please let me know if I could send my file to your mail id directly.

  • Posted 2 October 2017, 7:50 pm EST

    If you’re facing issue while uploading the zip files, I would suggest you to upload the zip file to our dropbox - https://www.dropbox.com/request/pprgRUGcO6evALDBlZUj

    Let me know the file name once you’ve uploaded it. Thanks

  • Posted 7 October 2017, 1:00 pm EST

    Hi,

    I have uploaded the file in dropbox.com site with the filename Viewer.zip. Please have a look and keep me posted.

    Thanks.

  • Posted 9 October 2017, 2:52 pm EST

    Hi

    Can I please have an update on this?

    Thanks.

  • Posted 12 October 2017, 3:12 pm EST

    Can anyone respond to this thread? The client is pushing us for a solution soon.

  • Posted 16 October 2017, 5:36 pm EST

    Thanks for the application. However, I’m unable to run it. The project is a class library and contains a user control and hence cannot be run stand-alone. I couldn’t find a report file as well in the project that I could use. Sorry to bother you, but is there another application which uses this class library which I can run to replicate the issue?

  • Posted 19 October 2017, 3:01 pm EST

    Hi,

    Actually our application is in C++ and since you don’t have viewer support in C++, we wrote this library and plugged into our application to view the reports. Unfortunately, i don’t have any executable file which i can share. Can you please look into the viewer code and/or the export logic in that library to see if anything is missing? That could help us to proceed further. Please help.

    Thanks.

  • Posted 23 October 2017, 1:46 am EST

    Sorry, I couldn’t find any export code in the application you sent. Please send it again with the export code so I can test it here as well.

    Thanks

  • Posted 23 October 2017, 10:00 pm EST

    Hi,

    In EagleWebReportViewer.cs file in that project, you can take a look at the WebRptViewer_ToolClick function which has the export functions defined for different formats. Please let me know if you still have any issues. Also, please have a look at the designer file to see if any property is missed OR wrong attribute assigned for the viewer in EagleWebReportViewer.designer.cs file.

    Thanks.

  • Posted 5 November 2017, 4:48 pm EST

    Any update on this please?

  • Posted 7 November 2017, 12:21 am EST

    Sorry for the delay on this one. this one got missed somehow. I saw the export but didn’t find anything that could be causing the issue you’re facing. You could try setting the FileFormat to xlsx as below:

    XLSEx.FileFormat = GrapeCity.ActiveReports.Export.Excel.Section.FileFormat.Xlsx;

    And may be try exporting using the XLSEx.Export() method instead of using the Viewer’s Export method. You would need to pass the report object to the Export method.

    I can’t think of any reason for the issue, unless I can run the report and reproduce the issue here. Request you to send across your report and data that I can use to replicate the issue.

    Thanks

  • Posted 14 November 2017, 5:42 pm EST

    SectionReportApplication1.ZIP

    Hi,

    I tried your suggestions and also looked at other threads and tried various combinations, but nothing works out. I have created a sample application and attached here. This sample has the issue that i reported originally. Can you please take a look and advice what is missing?

    One more note is that, I looked at the AR11 user guide and found the following statement in the Rendering to Excel section. Not sure if it has any impact. Please confirm. (Please look at the 3rd point in specific below).

    Limitations

    • BackgroundImage, overlapping controls, rounded corners (for Shape and Container) are not exported.
    • LineSpacing is not retained after export.
    • Exported FormattedText control does not preserve styles and formatting. It exports FormattedText as
    • TextBox with plain text without any tags.
    • Barcodes are exported as an image object so scanning of barcode image may fail in some cases. It

      depends on printer settings and the scanner quality. Barcodes may be blurred on export and the caption

      may get truncated in case of physical printing.
    • Exported boolean values are displayed in uppercase in both Xls and Xlsx files.
    • TextIndent property and FillCharacter property of the -TableOfContents control’s Level setting are not

      supported.
    • Text decoration (Underline and LineThrough) gets applied to the indented area, when left padding is

      applied to the TableOfControl’s levels.
  • Posted 19 November 2017, 2:56 pm EST

    Hi

    Did you have a chance to look at this?

    Thanks.

  • Posted 22 November 2017, 3:05 pm EST

    Anyone looking into this?

  • Posted 17 December 2017, 3:59 pm EST

    Any update on this?

  • Posted 20 December 2017, 1:34 am EST

    Anyone looking into this?

  • Posted 21 December 2017, 5:29 am EST

    Hi Michael,

    I have called Numerous times to the 800 number and our developer has posted numerous requests for updates? Can you please respond?

    Dave

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels