Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

VBscript : transpose simple table to export in excel

Hi,

I want to paste a simple table in excel with a VBscript.

It works perfectly with the code below:

  Set objCurrentSheet = objExcelDoc.Sheets(sheetName)

                    objExcelDoc.Sheets(sheetName).Range(sheetRange).Select

  objExcelDoc.Sheets(sheetName).Paste

but then I want to transpose the simple table with the following code :

Set objCurrentSheet = objExcelDoc.Sheets(sheetName)

                    objExcelDoc.Sheets(sheetName).Range(sheetRange).Select

  objExcelDoc.Sheets(sheetName).PasteSpecial Paste=xlPasteValuesAndNumberFormats,Transpose=true

but it does not work

you have an idea?

thank you very much

See the attach file

0 Replies