Topic
1 reply Latest Post - ‏2014-04-23T17:28:45Z by PatrickGuay
KBSri
KBSri
102 Posts
ACCEPTED ANSWER

Pinned topic How to export the data on to the Second sheet of the EXCEL

‏2014-04-16T07:56:14Z |

Hello All,

I want to export the data onto the second sheet of the EXCEL in DXL.

Assume I am calling the EXCEL and putting the data onto the particular sheet one by one.

Please help me out.

Thanks

Updated on 2014-04-16T09:45:54Z at 2014-04-16T09:45:54Z by KBSri
  • PatrickGuay
    PatrickGuay
    89 Posts
    ACCEPTED ANSWER

    Re: How to export the data on to the Second sheet of the EXCEL

    ‏2014-04-23T17:28:45Z  in response to KBSri

    Oh the joys of exporting to excel.

     

    Here is a snippet:

        OleAutoObj excelGetSheetOLE( OleAutoObj &objExcelWorkbook, int sheetNumber )
        {
     
            OleAutoObj objExcelSheet
     
            clear( args )
            put( args, sheetNumber )
            checkRes( oleGet( objExcelWorkbook, "Sheets", args, objExcelSheet ) )
     
            return objExcelSheet
        }

     


    // Somewhere in your method

    ...

    if (dataSheetNumber < 4)
            objSheet = excelGetSheetOLE( objWorkbook, dataSheetNumber )
            else 
            objSheet = excelCreateSheetOLE(objWorkbook, null)