CustomTable Export to Excel from a C++-App

CustomTable Export to Excel from a C++-App

RichardErnstberger
Enthusiast Enthusiast
458 Views
3 Replies
Message 1 of 4

CustomTable Export to Excel from a C++-App

RichardErnstberger
Enthusiast
Enthusiast

Hi all,

I'm trying to figure out how to prepare the options for the CustomTable.Export() method.

The SDK-Doc is somewhat confusing here:

CustomTable.Export Method Valid values for the Options parameter: Name Value Type Valid for export formats ------------------- ----------- -------------------------------- TableName String kMicrosoftExcel, kMicrosoftAccess ExportedColumns String All containing semicolon separated column titles IncludeTitle Boolean kMicrosoftExcel, kTextFileCommaDelimited, kTextFileTabDelimited, kUnicodeTextFileCommaDelimited, kUnicodeTextFileTabDelimited StartingCell String kMicrosoftExcel Template String kMicrosoftExcel AutoFitColumnWidth Boolean kMicrosoftExcel

 

Is there any sample on the export method or maybe a more informative description of the options and their structure.

 

To create a options object i have found the sample on 3DPDF-Export:

CComPtr oOptions = NULL;
pApp->TransientObjects->CreateNameValueMap(&oOptions);
// oOptions->put_Value(CComBSTR("FileOutputLocation"), CComVariant(filename));

 

At this point i have to deal with the right options and data types.

 

My main subject is to export a CustomTable to a customer defined Excel template.

 

I'm looking forward to any suggestion or tips about this.

Thanks in advance.

 

Kind regards,

Richard

0 Likes
Accepted solutions (1)
459 Views
3 Replies
Replies (3)
Message 2 of 4

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@RichardErnstberger,

 

Valid values for the Options parameter is documented in below link.

 

http://help.autodesk.com/view/INVNTOR/2019/ENU/?guid=GUID-8A886ACB-7251-4ECD-B550-EF38C2E27E48

 

Which looks like below table.

 

Name Value type Valid for Export formats
TableName String kMicrosoftExcel,kMicrosoftAccess
ExportedColumns String All containing semicolon separated column titles IncludeTitle Boolean kMicrosoftExcel, kTextFileCommaDelimited, kTextFileTabDelimited, kUnicodeTextFileCommaDelimited, kUnicodeTextFileTabDelimited
StartingCell String kMicrosoftExcel
Template String kMicrosoftExcel
AutoFitColumnWidth String  kMicrosoftExcel

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 3 of 4

RichardErnstberger
Enthusiast
Enthusiast

Many thanks Chandra Shekar,

this is much more informative now.

Hopefully the programming help page get's updated this way...

Kind regards,

Richard

0 Likes
Message 4 of 4

chandra.shekar.g
Autodesk Support
Autodesk Support

@RichardErnstberger,

 

You are welcome!!!

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes