Spire.DataExport for .NET is a 100% pure data .NET library suit for exporting data into MS Word, Excel, RTF, Access, PDF, XPS, HTML, XML, Text, CSV, DBF, SYLK, SQL Script, DIF, Clipboard, etc.

Thu Nov 03, 2011 12:30 pm

Hello,

I want to export a datatable that has linebreaks in certain rows, such as \r\n
When exporting these rows, only the first "line" is exported, the rest is ignored, how can we fix this?

Thank you

calago
 
Posts: 8
Joined: Thu Oct 20, 2011 9:09 am

Fri Nov 04, 2011 7:35 am

Hello calago,

Would you send us your database to help us reproduce you problem?

Thanks in advance
Have a nice day.
Tina
Technical Support/Developer,
e-iceblue Support Team
User avatar

Tina.Lin
 
Posts: 152
Joined: Tue Sep 13, 2011 5:37 am

Fri Nov 04, 2011 7:49 am

demo.zip
altered demo database file
(68.83 KiB) Downloaded 1836 times

Hello,

I have attached the sample database of the E-iceblue demo
The first 'part' description no: 900, is altered into:
Dive kayak
gfgfgfgfg
ffdgff

When exporting this using the demo to XLS, only the first line is exported!

This is a major problem for us!
I must say the rest of the dll is working fine!

Please help.

Thank you,

Regards,
Jeroen Reinink

calago
 
Posts: 8
Joined: Thu Oct 20, 2011 9:09 am

Mon Nov 07, 2011 9:10 am

Hello calago,

Sorry for late reply.

The table parts which you sent to me had been broken, You can see the description field had these content(gfgfgfgfg) which did not Caused by other factors.
I have made a demo which import master-slave table to XLS. I have attached the demo and demo.mdb file to you. You can have a try.

If you still have any other questions, please don't hesitate to contact us at any time for anything.
Have a nice day.
Attachments
ExportDataTableIntoXLS.7z
(92.19 KiB) Downloaded 1732 times
Last edited by Tina.Lin on Mon Nov 07, 2011 9:18 am, edited 1 time in total.
Tina
Technical Support/Developer,
e-iceblue Support Team
User avatar

Tina.Lin
 
Posts: 152
Joined: Tue Sep 13, 2011 5:37 am

Mon Nov 07, 2011 9:17 am

Hello,

Thank you for your reply, this is only not a solution for us!
As in the sample database, we have data with linebreaks in the cells. (I altered the parts table of the sample database so that this has the same type of content as we have..)
So in one cell the data is:

line 1 nbngbnng
line 2 ggjgjjg
line 3 hghgh

When exporting, only the first line of the cell is exported into Excel, without the rest of the cell data!

Please help!

Regards
Jeroen Reinink

calago
 
Posts: 8
Joined: Thu Oct 20, 2011 9:09 am

Mon Nov 07, 2011 9:39 am

Hello,

Sorry for my mistaking.

I tested again, all content of cells have been imported.
the content of the description field(of the parts)
line 1: Dive kayak
line 2:gfgfgfgfg
line 3:ffdgff

After importing to XLS, The content of description cell is :
Dive kayak

gfgfgfgfg

ffdgff

Please check the XLS file in attachment.
If still have any other questions, Please contact us.

BR,
Tina
Attachments
ExportDataTableIntoXLS.7z
(86.19 KiB) Downloaded 1770 times
Tina
Technical Support/Developer,
e-iceblue Support Team
User avatar

Tina.Lin
 
Posts: 152
Joined: Tue Sep 13, 2011 5:37 am

Mon Nov 07, 2011 10:10 am

Hello,

Thank you for the quick reply, we are using the Spire.DataExport module, not the Spire.XLS.
The code we are using here is something like this:

public static string ExportGridAsExcelSpire(DataTable gridTable, string defaultFileName) {

if (gridTable.Rows.Count > 65000) {
return chosenFileName;
}

form.Cursor = Cursors.WaitCursor;

//Create new datatable of current view
gridTable.TableName = "Sheet1";

Spire.DataExport.XLS.CellExport cellExport = new Spire.DataExport.XLS.CellExport();
cellExport.DataTable = gridTable;
cellExport.DataSource = Spire.DataExport.Common.ExportSource.DataTable;
cellExport.SheetName = "Sheet1";
cellExport.SaveToFile(defaultFileName);

form.Cursor = Cursors.Default;
return chosenFileName;
}

And in this code, only the first line is exported into the Excel worksheet.

Please help.

Regards,
Jeroen Reinink

calago
 
Posts: 8
Joined: Thu Oct 20, 2011 9:09 am

Tue Nov 08, 2011 8:21 am

Hello Reinink,

Sorry for late reply and my mistake about your question.

We tried to use Spire.DataExport to export data to XLS. We came up with the problem as yours. It's a bug of Spire.DataExport. We need time to research it.
We recommend you to use Spire.XLS which has more powerful functions to solve the problem.

Sorry again for the inconvenience caused by us.
Have a nice day.
Tina
Technical Support/Developer,
e-iceblue Support Team
User avatar

Tina.Lin
 
Posts: 152
Joined: Tue Sep 13, 2011 5:37 am

Tue Nov 08, 2011 8:26 am

Thank you,

We are using the "free" version of this fantastic tool, the XLS dll is not available for free.
Please let me know when a fix is available for this!

Thank you,
Regards,
Jeroen Reinink

calago
 
Posts: 8
Joined: Thu Oct 20, 2011 9:09 am

Wed Nov 16, 2011 2:35 am

Hello,

We have already arranged the bug to the schedule. We will repaired it as soon as possible. Once fixed, we will notify you.

Sorry for the inconvenience caused by us .
Have a nice day.
Tina
Technical Support/Developer,
e-iceblue Support Team
User avatar

Tina.Lin
 
Posts: 152
Joined: Tue Sep 13, 2011 5:37 am

Thu Nov 17, 2011 9:07 am

Hello calago,

Thank you for your patience with our Support team.

We have fixed the issue and the SPIREDATAEXPORT HotFix has been released.
You can download it from the following address:
http://www.e-iceblue.com/Download/download-dataexport-for-net-now.html
I also attached the demo which met your requirement to you. You can have a try.
Have a nice day.
Attachments
Program.7z
(824 Bytes) Downloaded 1906 times
Tina
Technical Support/Developer,
e-iceblue Support Team
User avatar

Tina.Lin
 
Posts: 152
Joined: Tue Sep 13, 2011 5:37 am

Fri Sep 06, 2013 5:26 pm

Hi,

We have been using this component for over 5 yrs now and had to use BCP in certain cases where we had line breaks in our exported data. Today I tried to export the same data with the latest version and faced following issues:

1. When I export data in CSV format which is a must have option on our site, the multi-line data gets truncated. So what I did was I used "NotTruncatableColumns" property. By doing this, the data is getting exported, but the line break is gone. I am giving you a sample of the data that I need to export.
Sample:
AHEEEHAPCHENCDGGJCHHGPAHEEEHA
BNFFFNBPMLIKELFKAOMDIPBNFFFNB
AJEHMGFFPJPLJBLDMHGHIOHLJGNFC
GGLNKKFAEDCOENCFIHOALPJEOFFIJ
KMNELMFKPPAJGMAFBIPHJHMIHNIDP
ENFFFNEPAOODKGEIDHCFAHFHABDJL
APBBBPAPJBPBCIPOOFNNACHECMNKF
HHHHHHHPHHPHHHHHPPHHHHHPPPPHP

Now, when I checked this in quick watch window, It had vbcrlf between 2 rows. It appears that the vbcrlf is getting removed. I am also giving you the code that I am using to export the data:

Dim ospire As New Spire.DataExport.TXT.TXTExport
ospire.ExportType = TextExportType.CSV
ospire.CSVOption.AllowQuote = True
ospire.AutoFitColWidth = True
ospire.DataSource = Common.ExportSource.DataTable
ospire.DataTable = ds.Tables(0)
ospire.CSVOption.Separator = ","
ospire.NotTruncatableColumns.Add("QR_Code")
ospire.DataEncoding = Common.EncodingType.UTF8
ospire.ExportLongColumn = True
ospire.SaveToFile("e:\exporttest.csv")


pls advise if there is anything that I need to rectify.

ashishs@mappsit.com
 
Posts: 3
Joined: Fri Sep 06, 2013 4:09 pm

Mon Sep 09, 2013 9:42 am

Dear ashishs,

Thanks for your inquiry.
I have reproduced your issue and posted it to our dev team. We will tell you when the issue is fixed.
Please wirte to us again in case you have further problems.

Best regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Mon Sep 09, 2013 10:20 am

Hi Amy,

Thanks for your reply. Can you give me any time-frame by which this issue will be fixed and available as hot release.

Regards
Ashish

ashishs@mappsit.com
 
Posts: 3
Joined: Fri Sep 06, 2013 4:09 pm

Tue Sep 10, 2013 2:17 am

Dear Ashish,

Thanks for your reply.
We plan to release a hotfix within this month. If you have a schedule in your side, please tell us, and then we will adjust our schedule according to yours.

Best regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.DataExport