Download to Excel with Images

Hello
The download to excel and PDF documents now includes images.  I have inlcuded images in my web templates to execute commands eg: Download to Excel, Bookmake etc.
See below:
img onclick="executeJS_EXPORT_XSLT120();" alt="Download to Excel" src="bwmimerep:///sap/bw/Mime/BEx/Icons/S_X_XLS.gif" border="0"
These images are simply for command execution and look out of place and serve no purpose in the excel or PDF files.
My Question:
Is it possible to exclude these images in the docnload to excel and PDF?
Thanks in advance.
Ian
Message was edited by:
        Ian Carbonel

Thanks For your reply Prakash.
This works well after some preliminary testing.
Thanks
Ian

Similar Messages

  • Down load webi report in excel with images

    Post Author: anshubit
    CA Forum: WebIntelligence Reporting
    Hello Everybody,
    I am facing issue in downloading webi report in excel with images.
    I am not getting any image in the wei report which are there in ANY part of it . like header, body and footer, but the download for pdf is working fine.
    I am using BO XI R2 webi and i need download only to excel with images as per the user requirements.
    Please let us know the work around if any.
    Regards,
    Anshuman Kumar

    Hi,
    I too had similar issue with Excel report.
    Had a discussion with BO tech support, they said it is an issue with Business Objects and it can be fixed in future versions.
    Thanks
    Phani

  • Download to Excel with Header but one field data is repeating

    Hi All,
    I'm downloading to Excel with Header. But One field is repeating and another is not. This is happening only when I use   'CONCATENATE ' . With Out this key usage data download to excel is correct. But   CONCATENATE is required as constant need to add before the one field.
    My coding is as below.
    DATA: BEGIN OF IT_FINAL OCCURS 0,
          P1(10) TYPE C,
          SI(19) type c, 
            END OF IT_FINAL.
    DATA : BEGIN OF IT_HEADER OCCURS 0,
    TITLE(100) TYPE C,
    END OF IT_HEADER,WA_HEADER LIKE IT_HEADER.
    loop at it_final.
      CONCATENATE '894412' it_final-SI INTO IT_FINAL.
    modify it_final.
    endloop.
    CLEAR:WA_HEADER.
      WA_HEADER-TITLE = 'Mat No'.
      APPEND WA_HEADER TO IT_HEADER.
      CLEAR:WA_HEADER.
      WA_HEADER-TITLE = 'Serial'.
      APPEND WA_HEADER TO IT_HEADER.
    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
        EXPORTING
          FILE_NAME  = P_FILE " path offile where u need to download
        TABLES
          DATA_TAB   = IT_FINAL
          FIELDNAMES = IT_HEADER.
    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
        EXPORTING
          FILE_NAME  = P_FILE " path offile where u need to download
        TABLES
          DATA_TAB   = IT_FINAL
          FIELDNAMES = IT_HEADER.
    Excel OUT PUT:
    Mat No            Serial
    11Z52321     8944126000
    11Z52394     8944126000
    11Z52395     8944126000
    Thank You,
    Pranitha

    hi,
    it would have been better if u hve opt for creating workarea for ur internal table.
    Try to use "clear it_final" after
    CONCATENATE '894412' it_final-SI INTO IT_FINAL.
    n also change the modify statement :
    modify it_final transporting SI .
    hope this will surely help you
    Regards,
    Punit
    Edited by: punit raval on Aug 26, 2011 2:55 PM

  • ALV output download to excel with top of page

    Hi,
    i want to download ALV grid output to excel sheet including the top of page. i am using the icon in application tool bar. but only data's are download to excel sheet. i cannot download the top of page. with out write coding in program can we download it. if yes pls explain.
    thanks.

    I'm sorry but I can't find FM with DOWNLOAD_EXCEL_*.
    I want to know more detail thing.
    plz. give answer to me anytime.
    I'm waiting..
    Edited by: Kwang Seop Kim on Sep 26, 2008 6:57 AM

  • ALV  download to EXCEL  with column headings etc.

    Getting data from a grid to EXCEL can be done in "List" mode vis system==>save etc but it's not particularly user friendly and in any case if you are displaying a nice ALV why should the user have to switch into LIST mode anyway.
    Anyway here's a decent way to do it and it gives great formatted column headings etc etc.
    1) in the ON_TOOLBAR method add this code
    method ON_TOOLBAR.
    type-pools icon.
    CLEAR ls_toolbar.
    MOVE  0 TO ls_toolbar-butn_type.
        MOVE 'EXCEL' TO ls_toolbar-function.
        MOVE  space TO ls_toolbar-disabled.
        MOVE  icon_xxl TO ls_toolbar-icon.
        MOVE 'Excel' TO ls_toolbar-quickinfo.
        MOVE  'EXCEL' TO ls_toolbar-text.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    2) In the ON_USER_COMMAND method add the following
    (if you have a class defined with SE24 you don't need the commented code).
    method ON_USER_COMMAND.
           FOR EVENT before_user_command OF cl_gui_alv_grid
           IMPORTING
             e_ucomm
             sender.
    CASE e_ucomm.
         .......   other toolbar funcs if you have any
          WHEN 'EXCEL'.
            CALL METHOD me->download_to_excel.
        ENDCASE.
    endmethod.
    3) code this method to download to EXCEL
    method DOWNLOAD_TO_EXCEL.
    FIELD-SYMBOLS:
           <fs0> TYPE STANDARD TABLE,
           <fs1> TYPE STANDARD TABLE.
        ASSIGN g_outtab1->* TO <fs0>.
        ASSIGN g_fldcat1->* TO <fs1>.
           CALL FUNCTION  'LVC_TRANSFER_TO_KKBLO'
          EXPORTING
            it_fieldcat_lvc   = <fs1>
        is_layout_lvc     = m_cl_variant->ms_layout
             is_tech_complete  = ' '
          IMPORTING
            es_layout_kkblo   = ls_layout
            et_fieldcat_kkblo = lt_fieldcat.
        LOOP AT lt_fieldcat INTO lt_fieldcat_wa.
          CLEAR lt_fieldcat_wa-tech_complete.
          IF lt_fieldcat_wa-tabname IS INITIAL.
            lt_fieldcat_wa-tabname = '1'.
            MODIFY lt_fieldcat FROM lt_fieldcat_wa.
          ENDIF.
          l_tabname = lt_fieldcat_wa-tabname.
        ENDLOOP.
        CALL FUNCTION 'ALV_XXL_CALL'
             EXPORTING
                  i_tabname           = l_tabname
                  is_layout           = ls_layout
                  it_fieldcat         = lt_fieldcat
                  i_title             = sy-title
             TABLES
                  it_outtab           = <fs0>
             EXCEPTIONS
                  fatal_error         = 1
                  no_display_possible = 2
                  OTHERS              = 3.
        IF  sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    endmethod.
    You get nice column headings etc and decently formatted EXCEL spreadsheet.
    For Office 2007 I think you need to apply a SAP note but it certainly works with OFFICE 2003 which is what we are still using.
    Cheers
    jimbo

    Getting data from a grid to EXCEL can be done in "List" mode vis system==>save etc but it's not particularly user friendly and in any case if you are displaying a nice ALV why should the user have to switch into LIST mode anyway.
    Anyway here's a decent way to do it and it gives great formatted column headings etc etc.
    1) in the ON_TOOLBAR method add this code
    method ON_TOOLBAR.
    type-pools icon.
    CLEAR ls_toolbar.
    MOVE  0 TO ls_toolbar-butn_type.
        MOVE 'EXCEL' TO ls_toolbar-function.
        MOVE  space TO ls_toolbar-disabled.
        MOVE  icon_xxl TO ls_toolbar-icon.
        MOVE 'Excel' TO ls_toolbar-quickinfo.
        MOVE  'EXCEL' TO ls_toolbar-text.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    2) In the ON_USER_COMMAND method add the following
    (if you have a class defined with SE24 you don't need the commented code).
    method ON_USER_COMMAND.
           FOR EVENT before_user_command OF cl_gui_alv_grid
           IMPORTING
             e_ucomm
             sender.
    CASE e_ucomm.
         .......   other toolbar funcs if you have any
          WHEN 'EXCEL'.
            CALL METHOD me->download_to_excel.
        ENDCASE.
    endmethod.
    3) code this method to download to EXCEL
    method DOWNLOAD_TO_EXCEL.
    FIELD-SYMBOLS:
           <fs0> TYPE STANDARD TABLE,
           <fs1> TYPE STANDARD TABLE.
        ASSIGN g_outtab1->* TO <fs0>.
        ASSIGN g_fldcat1->* TO <fs1>.
           CALL FUNCTION  'LVC_TRANSFER_TO_KKBLO'
          EXPORTING
            it_fieldcat_lvc   = <fs1>
        is_layout_lvc     = m_cl_variant->ms_layout
             is_tech_complete  = ' '
          IMPORTING
            es_layout_kkblo   = ls_layout
            et_fieldcat_kkblo = lt_fieldcat.
        LOOP AT lt_fieldcat INTO lt_fieldcat_wa.
          CLEAR lt_fieldcat_wa-tech_complete.
          IF lt_fieldcat_wa-tabname IS INITIAL.
            lt_fieldcat_wa-tabname = '1'.
            MODIFY lt_fieldcat FROM lt_fieldcat_wa.
          ENDIF.
          l_tabname = lt_fieldcat_wa-tabname.
        ENDLOOP.
        CALL FUNCTION 'ALV_XXL_CALL'
             EXPORTING
                  i_tabname           = l_tabname
                  is_layout           = ls_layout
                  it_fieldcat         = lt_fieldcat
                  i_title             = sy-title
             TABLES
                  it_outtab           = <fs0>
             EXCEPTIONS
                  fatal_error         = 1
                  no_display_possible = 2
                  OTHERS              = 3.
        IF  sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    endmethod.
    You get nice column headings etc and decently formatted EXCEL spreadsheet.
    For Office 2007 I think you need to apply a SAP note but it certainly works with OFFICE 2003 which is what we are still using.
    Cheers
    jimbo

  • Customize download to excel with disclaimer

    I need to customize download link in dashboard so that results are downloaded to an Excel sheet but with client' s disclaimer message at the end. Client do not want the disclaimer to be shown on the dashboard. So basically we need to alter the download to Excel link at the system level, so that whenever it is clicked, the report gets downloaded to an excel with the disclaimer message at the end.
    I did some work and found that when we click on Download To Excel option, a function gets called from file \OracleBI\web\msgdb \viewscontrolmessages.xml, there we have:
    Download(&#39;@{command}&amp;Format=mht&am p;amp;Extension=.xls&#39;)
    I think someway we need to alter this download function so that it appends a disclaimer message to Excel after every download.
    Or let me know if you think any other way!
    We are using OBIEE 10g .
    Rahul

    This seems now "re-inventing the wheel" sort of requirement. I was looking into possibility of using GO URL to get the report in csv and then writing a java script to append the disclaimer text in the downloaded file . But am stuck on the front, how to store the file without any manual effort. Because when we use Go URL a save as pop-up throws, rather I want when user clicks on our customized Download link, it should download the data and store in a file and then append it with a disclaimer text and then throw a save as pop-up.
    Also has anyone any idea how to use the any OBIEE java functions in a java script written in text view ( with html enabled ) ?
    Let me know if anyone has any thoughts on how to do that!

  • Webdynpro abap ALV export to excel with images problem

    Hello experts,
    I'm having problems with standard excel export functionality in webdynpro abap ALV.
    In my table i have images taken from content server (employee photos) linked with URL to a table_cell Image, when i export the table to excel using standard function the images is showed as a broken picture with the following text:
    "The linked image cannot displayed. The file may have been moved, or deleted. Verify that the link points to the correct file and location."
    I'm running on sap basis 7.02 SP13 and implemented the notes 1975765 and 1985288 but not resolved this issue.
    Do you have any ideas?
    Thank you.

    Hi Jorge,
    Are you able to download the ICONs from alv table? try to use some icon source '~Icon/Add' and check out if you can download it to excel successfully.
    FYR:
    Regards,
    Rama

  • Download to Excel with Column Headings.

    Hi All,
    I have a very small issue.I want to download the Data from an internal table to an Excel Sheet Along with the Column heading of the corresponding Field...
    I tried with ws_excel and gui_download... not reached to any conclusion,,,I cant go for OLE technique as i have huge amount of data in my internal table.
    If anyone have faced the same problem ...please suggest something.
    Thanks in advance,
    Mayank.

    Hi,
    Once I also faced the same problem.It was solved by the below coding.In my coding i_download is the internal table with two fields werks and matnr .w_download is its workarea.
    PARAMETERS    p_file  LIKE rlgrap-filename.     
      "File name
    Local Variable declaration
      DATA lv_file TYPE string.
      lv_file = p_file.
      PERFORM f1710_populate_heading.
      CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
                filename                = lv_file
                filetype                = 'ASC'
                write_field_separator   = 'X'
           TABLES
                data_tab                = i_download
           EXCEPTIONS
                file_write_error        = 1
                no_batch                = 2
                gui_refuse_filetransfer = 3
                invalid_type            = 4
                no_authority            = 5
                unknown_error           = 6
                header_not_allowed      = 7
                separator_not_allowed   = 8
                filesize_not_allowed    = 9
                header_too_long         = 10
                dp_error_create         = 11
                dp_error_send           = 12
                dp_error_write          = 13
                unknown_dp_error        = 14
                access_denied           = 15
                dp_out_of_memory        = 16
                disk_full               = 17
                dp_timeout              = 18
                file_not_found          = 19
                dataprovider_exception  = 20
                control_flush_error     = 21
                OTHERS                  = 22.
      IF sy-subrc = 0.
        MESSAGE i000 WITH text-005. "File downloded successfully
      ELSE.
        CASE sy-subrc.
          WHEN 1.
            MESSAGE i000 WITH text-014.
          WHEN 21.
            MESSAGE i000 WITH text-071.
        ENDCASE.
      ENDIF.
    ENDFORM.                    " f1500_download_data
    *&      Form  f1710_populate_heading
          Populate header records
    FORM f1710_populate_heading.
      CLEAR w_download.
    Design the text element to handle maximum length of
    the output
      w_download-werks = text-001.
      w_download-matnr   = text-002. 
        INSERT w_download INTO i_download INDEX 1.
    ENDFORM.                    " f1710_populate_heading
    Hope this is clear.
    If your problem is solved,could you please reward useful answers and close the thread.
    Rgds,
    J.Jayanthi

  • Download to excel with multiple lines in header

    Hi experts,
    Is there any Funtion module available to download an internal table contents into Local directory of PC with multiple lines in header.
    i.e.  let us say i hv internal table of 5 entries with 3 columns...
    i need to download this 5 entries into an excel file with some texts above the table contents...
    For eg : in the below format...
    Sample line 1
    sample line 2
    sample line 3
    colheader1     colheader2     colheader3
    item1                              
    item2
    item3
    item4
    item5
    Please help.
    Edited by: Lakshmiraj on Jul 15, 2010 3:26 AM

    There is another option of using OLE automation Please check the link below
    http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-OLEAutomationusing+MS-Excel
    OR
    chek for the example program in Tcode DWDM ( OLE example )
    OR
    Use FM KCD_EXCEL_OLE_TO_INT_CONVERT ( Fm Uses the same OLE automation)
    Hope it helps
    Anup

  • Download .wav clips with images using PSE8

    I've recorded messages into some of the pictures I took at the time I took them.  The camera an Olympus E-PL1 creates a wav file.  How do I get PSE8 to download these wav files into the computer folder along with the pictures pSE8 downloads?  Right now I have to go back and copy the wav files through WIndows and paste into the computer folder that PSE8 created for the image files.
    Also, is there a way to "see" and play the wav files through PSE8 once they are in the computer folder?

    When you import photos from Camera to your computer, select these videos as well to import through File->Get Photos and Videos->From Camera or Card Reader option. It will also download the audio file. Also, if your .wav files are copied to the computer select File->Get Photos and Videos->From Files and Folders option and browse to the .wav file. Select the file to import and it will be imported into organizer.Organizer can also play these audio files.
    If you have already tried this then where exactly you are getting the error?

  • Downloading to Excel with OLE concept

    Hi All,
      I have created a program in 6.0 version which gives my exact requirement.
    Please copy the code and execute the program.
    *& Report  ZSK123                                                      *
    REPORT  ZSK123                                  .
    type-pools: ole2.
    DATA: H TYPE I.
    data: g_sno(5) type n.
    DATA: H_ZL TYPE OLE2_OBJECT,
          H_F  TYPE OLE2_OBJECT.
    types: begin of x_comment,
            comment type string,
          end of x_comment.
    DATA:  H_EXCEL TYPE OLE2_OBJECT,        " EXCEL OBJECT
    H_MAPL TYPE OLE2_OBJECT,         " LIST OF WORKBOOKS
    H_MAP TYPE OLE2_OBJECT.          " WORKBOOK
    types: begin of x_jobs,
            sno(3) type n,
            jobname(50) type c,
            comment type string,"zrtr,
          end of x_jobs.
    DATA: W_STRING(2000) TYPE C.
    data: t_jobs type standard table of x_jobs,
          w_jobs type x_jobs.
    data: hexcel type ole2_object,
          hrange type ole2_object.
    data: l_string type string,
          w_tabix type sy-tabix.
    w_jobs-sno = 100.
    w_jobs-jobname = 'HAA'.
    APPEND W_JOBS TO T_JOBS.
    w_jobs-sno = 2.
    w_jobs-jobname = 'BAI'.
    APPEND W_JOBS TO T_JOBS.
    loop at t_jobs into w_jobs.
    w_tabix = sy-tabix.
    w_jobs-comment = 'What is your name'.
    concatenate w_jobs-comment 'My name is Subhani' into w_jobs-comment
              separated by cl_abap_CHAR_UTILITIES=>newline.
    modify t_jobs from w_jobs index w_tabix transporting comment.
    endloop.
    CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
      SET PROPERTY OF H_EXCEL  'VISIBLE' = 1.
    GET LIST OF WORKBOOKS, INITIALLY EMPTY
      CALL METHOD OF H_EXCEL 'WORKBOOKS' = H_MAPL.
    PERFORM ERR_HDL.
    ADD A NEW WORKBOOK
      CALL METHOD OF H_MAPL 'ADD' = H_MAP.
    PERFORM ERR_HDL.
    OUTPUT COLUMN HEADINGS TO ACTIVE EXCEL SHEET
      PERFORM FILL_CELL USING 1 1 1 000 'SNO'(001).
      PERFORM FILL_CELL USING 1 2 1 000 'JOBNAME'(002).
      PERFORM FILL_CELL USING 1 3 1 000 'COMMENT'(003).
      LOOP AT T_JOBS INTO W_JOBS.
    COPY DATATO ACTIVE EXCEL SHEET
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 000 W_JOBS-SNO.
        PERFORM FILL_CELL USING H 2 0 000 W_JOBS-JOBNAME.
        PERFORM FILL_CELL USING H 3 0 000 W_JOBS-COMMENT.
      ENDLOOP.
    CALL METHOD OF H_EXCEL 'WORKBOOKS' = H_MAPL.
      CALL METHOD OF H_EXCEL 'WORKSHEETS' = H_MAPL." EXPORTIN    G #1 = 2.
    PERFORM ERR_HDL.
    ADD A NEW WORKBOOK
      CALL METHOD OF H_MAPL 'ADD' = H_MAP EXPORTING #1 = 2.
    PERFORM ERR_HDL.
    TELL USER WHAT IS GOING ON
      SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
      LOOP AT T_JOBS INTO W_JOBS.
    COPY FLIGHTS TO ACTIVE EXCEL SHEET
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 000 W_JOBS-SNO.
        PERFORM FILL_CELL USING H 2 0 000 W_JOBS-JOBNAME.
        PERFORM FILL_CELL USING H 3 0 000 W_JOBS-COMMENT.
      ENDLOOP.
      FREE OBJECT H_EXCEL.
    PERFORM ERR_HDL.
    *&      FORM  ERR_HDL
          OUTPUTS OLE ERROR IF ANY                                       *
    -->  P1        TEXT
    <--  P2        TEXT
    FORM ERR_HDL.
      IF SY-SUBRC <> 0.
        WRITE: / 'BATCH JOB AUTOMATION CARRIED OUT SUCCESFULLY'.
        STOP.
      ENDIF.
    ENDFORM.                    " ERR_HDL             .
          FORM FILL_CELL                                                *
          SETS CELL AT COORDINATES I,J TO VALUE VAL BOLDTYPE BOLD       *
    FORM FILL_CELL USING I J BOLD COL VAL.
      CALL METHOD OF H_EXCEL 'CELLS' = H_ZL EXPORTING #1 = I #2 = J.
    PERFORM ERR_HDL.
      SET PROPERTY OF H_ZL 'VALUE' = VAL .
    PERFORM ERR_HDL.
      GET PROPERTY OF H_ZL 'FONT' = H_F.
    PERFORM ERR_HDL.
      SET PROPERTY OF H_F 'BOLD' = BOLD .
    PERFORM ERR_HDL.
      SET PROPERTY OF H_F 'COLOR' = COL.
    PERFORM ERR_HDL.
    ENDFORM.                    "FILL_CELL
    But in 4.6c there is no method called cl_abap_char_utilities=>newline. So how can i get the same output in 4.6c. please help.
    Regards,
    Subhani.

    I don't see any method in class cl_abap_char_utilities with name newline.
    But when i search class for this string, i see
    constants NEWLINE type ABAP_CHAR1 value %_NEWLINE. "#EC NOTEXT
    Check this once in your system too.
    And you can declare similar variable in 46C and use the same in the program.

  • OBIEE-Values after decimal changing after download in excel format

    Hi,
    I have reports in OBIEE 11g,in which some columns have values in %.When i try the various export/download functions and noticed that the Excel download did not maintain the fomatting for pecentage values, they fields go out to about 12 decimal places or so.
    For eg..if a value in report is like 12.54
    After export in Excel it looks like 12.546780393345 .
    As i want the same format,pls suggest the solution.

    Hi,
    Refer below link:
    Downloading to Excel with three decimal precision
    format problem while download to excel
    Re: Formatting problem in download report into EXCEL Sheet
    BUG:
    •9107277 KEEP THE NUMBER PRECISION IN DATABASE WHEN “DOWNLOADING TO EXCEL”
    Thanks
    Deva

  • Displaying images along with data on downloading from excel

    Hi All,
    I need to show images along with data in the excel sheet when user clicks downld to excel button.  Is there possible way to show the images in excel sheet if, kindly help.
    Thanks & Regards
    Jaspreet Kaur

    Hi Vinod
    Basically I have a report which needs to be downloaded to excel sheet. For each record there is a particular image in the first column for ex say my colums are img, desc.  Now image column contains an image corresponding to each description.  If its a file, a folder image is there; if its a document, a page image is there etc.  Now i am can display the data of  text fields  in the following manner ie label =new Label(0,RowCount, wdContext.nodeVn_PortalExcel().getVn_PortalExcelElementAt(i).getVa_Role(), PortalRoleDataFormat);
    PortalReportsheet.addCell(label);
    but how do i display the image in the excel sheet?
    Is it possible to do so, if so please provide assistance.
    Thanks & Regards
    Jaspreet Kaur

  • Unable to write an image to excel with report generation toolkit

    I am unable to write an image to excel with the report generation toolkit. The VI works fine for word, but when I select Excel the speadsheet pens but remains blank.

    Ranjeet
    I am using Labview 2013 or 8.0, but here is an image of the very simple test VI.
    Regards
    Steve

  • Exception while Exporting Datagridview data with Images to Excel...

    Hi Everyone,
    I have datagridview in that 17 columns are text columns and 5 columns are Image columns,when I'm trying to export whole gridview data's along with images to EXCEL,getting "HRESULT:
    0x800A03EC" Error..While debugging the code I'm getting the error on image column not able to export..
    Can anybody help us to resolve this issue..
    Here is my code which i used:
    private void btnexportexcel_Click(object sender, EventArgs e)
    try
    SaveFileDialog savefile = new SaveFileDialog();
    savefile.Filter = "Excel (*.xls)|*.xls";
    if (savefile.ShowDialog() == DialogResult.OK)
    if (!savefile.FileName.Equals(string.Empty))
    FileInfo finfo = new FileInfo(savefile.FileName);
    if (finfo.Extension.Equals(".xls"))
    Excel.Application xlApp;
    Excel.Workbook xlWorkBook;
    Excel.Worksheet xlWorkSheet;
    object misValue = System.Reflection.Missing.Value;
    xlApp = new Excel.Application();
    xlWorkBook = xlApp.Workbooks.Add(misValue);
    xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(2) ;
    int i = 0;
    int j = 0;
    for (i = 0; i <= dataGridView1.RowCount - 1; i++)
    for (j = 0; j <= dataGridView1.ColumnCount - 1; j++)
    DataGridViewCell cell = dataGridView1[j, i];
    xlWorkSheet.Cells.Borders.LineStyle = Excel.XlLineStyle.xlContinuous;
    xlWorkSheet.Columns.AutoFit();
    if (cell.Value.GetType() == typeof(Bitmap))
    string image =Convert.ToString(dataGridView1.CurrentRow.Cells[i].Value); 
    Excel.Range oRange = (Excel.Range)xlWorkSheet.Cells[i + 1, j + 1];
    float Left = (float)((double)oRange.Left);
    float Top = (float)((double)oRange.Top);
    const float ImageSize = 32;
    xlWorkSheet.Shapes.AddPicture(image, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, Left, Top, ImageSize, ImageSize);
    oRange.RowHeight = ImageSize + 2; 
    else
    xlWorkSheet.Cells[i + 1, j + 1] = cell.Value;
    xlWorkBook.SaveAs(savefile.FileName, Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue,
    Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
    xlWorkBook.Close(true, misValue, misValue);
    xlApp.Quit();
    releaseObject(xlWorkSheet);
    releaseObject(xlWorkBook);
    releaseObject(xlApp);
    MessageBox.Show("Excel file created , you can find the file " + savefile.FileName);
    else
    MessageBox.Show("Invalid file type");
    else
    MessageBox.Show("You did pick a location " + "to save file to");
    catch (Exception ex)
    MessageBox.Show("Exception Occured", ex.Message);
    Thanks & Regards RAJENDRAN M

    Hi Everyone,
    I have datagridview in that 17 columns are text columns and 5 columns are Image columns,when I'm trying to export whole gridview data's along with images to EXCEL,getting "HRESULT:
    0x800A03EC" Error..While debugging the code I'm getting the error on image column not able to export..
    Can anybody help us to resolve this issue..
    Here is my code which i used:
    private void btnexportexcel_Click(object sender, EventArgs e)
    try
    SaveFileDialog savefile = new SaveFileDialog();
    savefile.Filter = "Excel (*.xls)|*.xls";
    if (savefile.ShowDialog() == DialogResult.OK)
    if (!savefile.FileName.Equals(string.Empty))
    FileInfo finfo = new FileInfo(savefile.FileName);
    if (finfo.Extension.Equals(".xls"))
    Excel.Application xlApp;
    Excel.Workbook xlWorkBook;
    Excel.Worksheet xlWorkSheet;
    object misValue = System.Reflection.Missing.Value;
    xlApp = new Excel.Application();
    xlWorkBook = xlApp.Workbooks.Add(misValue);
    xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(2) ;
    int i = 0;
    int j = 0;
    for (i = 0; i <= dataGridView1.RowCount - 1; i++)
    for (j = 0; j <= dataGridView1.ColumnCount - 1; j++)
    DataGridViewCell cell = dataGridView1[j, i];
    xlWorkSheet.Cells.Borders.LineStyle = Excel.XlLineStyle.xlContinuous;
    xlWorkSheet.Columns.AutoFit();
    if (cell.Value.GetType() == typeof(Bitmap))
    string image =Convert.ToString(dataGridView1.CurrentRow.Cells[i].Value); 
    Excel.Range oRange = (Excel.Range)xlWorkSheet.Cells[i + 1, j + 1];
    float Left = (float)((double)oRange.Left);
    float Top = (float)((double)oRange.Top);
    const float ImageSize = 32;
    xlWorkSheet.Shapes.AddPicture(image, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, Left, Top, ImageSize, ImageSize);
    oRange.RowHeight = ImageSize + 2; 
    else
    xlWorkSheet.Cells[i + 1, j + 1] = cell.Value;
    xlWorkBook.SaveAs(savefile.FileName, Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue,
    Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
    xlWorkBook.Close(true, misValue, misValue);
    xlApp.Quit();
    releaseObject(xlWorkSheet);
    releaseObject(xlWorkBook);
    releaseObject(xlApp);
    MessageBox.Show("Excel file created , you can find the file " + savefile.FileName);
    else
    MessageBox.Show("Invalid file type");
    else
    MessageBox.Show("You did pick a location " + "to save file to");
    catch (Exception ex)
    MessageBox.Show("Exception Occured", ex.Message);
    Thanks & Regards RAJENDRAN M

Maybe you are looking for

  • How do I change the Apple ID that iCloud uses to sync the iPad?

    How do I change an iPad's iCloud Apple ID without deleting that entire iCloud account? When I go to Settings>iCloud on this iPad, the Apple ID email address is not an active field, so I cannot enter the new Apple ID. The iPad is currently syncing suc

  • Captioning Problem in Photoshop Elements 7 (and earlier)

    Photoshop Elements provides the ability to add a caption at the bottom of a full image screen. However, once I have typed the caption and click the down arrow to view and caption the next photo, the displayed photos quickly scroll to the last image.

  • 1G Shuffle not recognised on iMac

    Hello and thanks for looking at my question; I'm sure it's an easy one for you gurus.  I recently bought a 1Gb 1G Shuffle on the refurb store for £39. The first time I used it I connected it to my TiBook (10.4.8 & 7.0.2) and loaded it up with some Po

  • Bluetooth suddenly disabled

    Hi.  I have been using my Bluetooth on my phone to connect to my in-car satnav and for other purposes for well over a year without problems.  However it has suddenly stopped working and when I go into Bluetooth it says "Bluetooth disabled".  When I c

  • Problem after updating software

    I updated my ipod touch with the new software download and now the screen is HUGE and I can't seem to make the icons smaller. I tried various things and finally tried RESTORE. Same problem.