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.

Wed Dec 05, 2007 9:04 pm

Looking at the product for possible purchase but have not been able to determine how the change/modify the attributes for a given column. That is we may have rows in which we have an output column that needs a different precison then the column next to it, or we have a string/text output column that has a length/size that is different then the source data.

I guess that I am looking for is a couple examples that I can reference.

botimerb
 
Posts: 4
Joined: Wed Dec 05, 2007 8:28 pm

Tue Dec 11, 2007 1:07 pm

Hello,

You can set ColumnsPrecision property value to change
length and precision of column.

Format:
ColumnName=Length,Precision

example:
PartNo=8,2
Technical Support
Spire.DataExport Team

support@e-iceblue.com

DataExport
 
Posts: 35
Joined: Thu Jun 29, 2006 2:29 pm

Tue Dec 11, 2007 3:41 pm

Thank took care of the Precision issue, however when I try to use the length attribute on a text/character column it seesm to distort the entire file structure. Below is an example:

this.dbfExport1.Columns.AddRange(new object[] {
"Description", "PartNo", "OnHand", "VendorNo"});

this.dbfExport1.ColumnsLength.AddRange(new object[] { "Description=20"});

The first list is without the ColumnsLength:

DESCRIPTIO PARTNO ONHAND VENDORNO
Dive kayak 900.000 24.00000 3820.0000
Underwater Diver Vehicle 912.000 5.00000 3820.0000
Regulator System 1313.000 165.00000 3511.0000
Second Stage Regulator 1314.000 98.00000 5641.0000

This list includes the ColumnsLength attribute:

DESCRIPTIO PARTNO ONHAND VENDORNO
Dive kayak 900.000 24.00000 3820.0000
Underwater Diver Veh
000 Regulator System 1313.000
000 Second Stage Reg

Is there something that I am doing wrong?

botimerb
 
Posts: 4
Joined: Wed Dec 05, 2007 8:28 pm

Mon Dec 17, 2007 9:13 am

Hello,

ColumnsLength only avaiblable for string column.
Technical Support
Spire.DataExport Team

support@e-iceblue.com

DataExport
 
Posts: 35
Joined: Thu Jun 29, 2006 2:29 pm

Wed Dec 19, 2007 2:39 pm

Not sure if I explained it clear but I was only putting the length restriction on a TEXT/String column.

this.dbfExport1.ColumnsLength.AddRange(new object[] { "Description=20"});

When ever I try to alter the length of a TEXT column the entire data structure is skewed and not usable.

botimerb
 
Posts: 4
Joined: Wed Dec 05, 2007 8:28 pm

Return to Spire.DataExport