GUI_UPLOAD for excel file

hi,
       i am facing a problem with function module GUI_UPLOAD.
when i am trying to upload a excel file using gui_upload,the data that gets uploaded to internal table is garbage (contains # etc)..
        what can be the reason.
                                   shailendra.

hi check this..
REPORT  ZTESTPROG003.
TYPES:
     BEGIN OF ty_upload,
     matnr like mara-matnr,
     meins like mara-meins,
     mtart like mara-mtart,
     mbrsh like mara-mbrsh,
     END OF ty_upload.
  DATA it_upload TYPE STANDARD TABLE OF ty_upload WITH header line.
  DATA wa_upload TYPE ty_upload.
  DATA: itab TYPE STANDARD TABLE OF alsmex_tabline WITH header line.
DATA itab TYPE STANDARD TABLE OF ty_upload WITH header line.
  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      filename    = 'C:\Documents and Settings\venkatapp\Desktop\venkat.xls'
      i_begin_col = 1
      i_begin_row = 1
      i_end_col   = 4
      i_end_row   = 65535
      TABLES
      intern      = itab.
if not itab[] is initial.
loop at itab .
case itab-col.
when '0001'.
it_upload-matnr = itab-value.
when '0002'.
it_upload-meins = itab-value.
when '0003'.
it_upload-mtart = itab-value.
when '0004'.
it_upload-mbrsh = itab-value.
append it_upload.
clear it_upload.
clear itab.
endcase.
endloop.
endif.
loop at it_upload.
write:/ it_upload-matnr,it_upload-meins,it_upload-mtart,it_upload-mbrsh.
endloop.

Similar Messages

  • GUI_UPLOAD for Excel file read

    Hi Experts,
      I am transferring excel sheet content to internal table, for which I am using GUI_UPLOAD function module. It is successfully reading, but I am getting ##### values instead of text values. I am getting more than expected lines also. My code is below.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                               = w_file_url
        FILETYPE                            = 'DAT'
        HAS_FIELD_SEPARATOR    = 'X'
      tables
        data_tab                               = t_uploadeddata
    I used my file type as 'ASC' and 'BIN' also. Can anybody help me?
    Thanks and regards,
    Venkat

    the function module gui_upload, accepts the filename as a string variable....
    hence do the following
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-T01.
    PARAMETERS : P_FILE TYPE RLGRAP-FILENAME DEFAULT 'D:\Example.txt'.
    SELECTION-SCREEN END OF BLOCK B1.
    data : w_file type string.
    w_file = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = W_FILE
    FILETYPE = 'ASC'
    has_field_separator = ' '
    tables
    data_tab = FILE_ITAB
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    NO_AUTHORITY = 6
    UNKNOWN_ERROR = 7
    BAD_DATA_FORMAT = 8
    HEADER_NOT_ALLOWED = 9
    SEPARATOR_NOT_ALLOWED = 10
    HEADER_TOO_LONG = 11
    UNKNOWN_DP_ERROR = 12
    ACCESS_DENIED = 13
    DP_OUT_OF_MEMORY = 14
    DISK_FULL = 15
    DP_TIMEOUT = 16
    OTHERS = 17
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Gui_upload for csv file with numeric n date fields

    Hi ,
      i searched on net on how to use GUI_UPLOAD for csv files using split function but the spilt function requires that the data type of all fields of the internal table should be character whereas in my case there is a numeric n data field too.So kindly help me how to do it.
    One way ppl might suggest that give all the fields as char in the internal n after recieving the data in the internal convert the required fields back to data n numeric n then finally insert to the database but if i have 80 fields u would really dont want to do that as it requires precision to convert it to the same type n length as in the original database for all the fields.

    yeah i guess that would be a bit longer if i m having more no of fields (80) compared to ORACLE where this can be done in a shorter way.
    SO i shall use 2 internal tables here rite?? i mean first one(with all fields as char) for storing the split function values and the other one (with actual data types) .CAN u plz tell me how to convert or cast from one data type to another n while moving values from 1st internal table to another  which way shall i do.
    Thanks for ur help n can u suggest if there is any other method for uploading csv also other than this split method n whether this method is better n faster than others.
    THANX

  • Reason to set MaxErrorCount along with Propogate value for Excel Files

    Hi,
    I had an ETL earlier which processed CSV files from a folder. The requirement was to load the error files into a Rejected folder but continue to process all the files from the source Folder. This requirement was satisfied by setting the value of the
    system variable "Propogate" in EventHandler section for DataFlowTask to "false".
    MaxErrorCount value for the ForEach Loop is having its default value as "1".
    When tested, it was working perfectly fine
    Now currently there is an Excel file as source having same requirement as above. But even when then variable "Propogate" was set to "false" as above, the execution was getting stopped when an error file was found.
    Later I found the below link :
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/0065b5c2-f633-4cbf-81f9-031d1ed25555/how-to-skip-wrong-excel-files-ignore-errors-on-ssis-foreach-task
    As mentioned in the link, I have done below changes
    1)Set MaxErrorCount for ForEachLoop to 1000
    2)"Propogate" variable is set to false
    Now this is working perfectly fine.
    Can you please let me know why did the setting of "Propogate" worked for CSV but did not work for Excel. For Excel files why was an additional setting for MaxErrorCount  was required.
    It would be very much helpful if I can get a detail information on the above
    Thanks,
    Raksha
    Raksha

    Hi Raksha,
    In you SSIS package, setting the Propagate system variable to False of the Event Handler prevents the Data Flow Task (DFT) propagating its failure to its parent container. For the ValidateMetadata property of a Data Flow Task Component, it doesn’t only affect
    the DFT at design time but also at runtime. During the Validation phase, a component is supposed to check to make sure that the cached metadata in the package is still in sync with the underlying table/view/query. If there is a mismatch, the component returns
    a special status (VS_NEEDSNEWMETADATA). When this happens at design-time, SSIS triggers a metadata refresh by calling ReinitializeMetadata(). At runtime, this results in an error.
    In your scenario, by setting the ValidateMetadata property to false, the error of the DFT is avoided, hence, you don’t need to set the MaxErrorCount to a value more than 1.
    For more information about how ValidateMetadate property works, please see Matt’s answer in the following thread:
    http://stackoverflow.com/questions/3297097/validateexternalmetadata-property-what-exactly-does-this-do 
    Regards,
    Mike Yin
    TechNet Community Support

  • GUI_Upload & GUI_Download for excel files

    Hi experts,
    I want to upload excel file into sap. i am trying with GUI_Upload function module. when i see the data it is filled with # and other special char. When i save the excel file as .txt file and then read the txt file. Now i am getting correct data. Is it possible to read Excel data using GUI_UPLOAD directly without changing .xls to .txt.
    Also, how to change data in  second or  third tab of excel file using GUI_Download.
    -RK

    Hi
    Actually ur file selection s wrong.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          PROGRAM_NAME  = SYST-REPID
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = 'P_FNAME'
          STATIC        = 'X'
         MASK          = '*.txt'
        CHANGING
          FILE_NAME     = P_FNAME
        EXCEPTIONS
          MASK_TOO_LONG = 1
          OTHERS        = 2.
    Upload:
    CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                = LV_FNAME
          FILETYPE                = 'ASC'
          HAS_FIELD_SEPARATOR     = 'X'
        TABLES
          DATA_TAB                = IT_UEXBANK01
        EXCEPTIONS
          FILE_OPEN_ERROR         = 1
          FILE_READ_ERROR         = 2
          NO_BATCH                = 3
          GUI_REFUSE_FILETRANSFER = 4
          INVALID_TYPE            = 5
          NO_AUTHORITY            = 6
          UNKNOWN_ERROR           = 7
          BAD_DATA_FORMAT         = 8
          HEADER_NOT_ALLOWED      = 9
          SEPARATOR_NOT_ALLOWED   = 10
          HEADER_TOO_LONG         = 11
          UNKNOWN_DP_ERROR        = 12
          ACCESS_DENIED           = 13
          DP_OUT_OF_MEMORY        = 14
          DISK_FULL               = 15
          DP_TIMEOUT              = 16
          OTHERS                  = 17.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

  • GUI_UPLOAD for excel?

    Experts:
    How to upload excel file directly into an internal table using GUI_UPLOAD without converting the excel file into a tab delimited file?
    Thanks,
    UV

    hope with this u can achieve wat ur exactly looking for
    REPORT  zupload_excel_to_itab.
    TYPE-POOLS: truxs.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    TYPES: BEGIN OF t_datatab,
    col1(30)    TYPE c,
    col2(30)    TYPE c,
    col3(30)    TYPE c,
    END OF t_datatab.
    DATA: it_datatab type standard table of t_datatab,
    wa_datatab type t_datatab.
    DATA: it_raw TYPE truxs_t_text_data.
    At selection screen
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CALL FUNCTION u2018F4_FILENAMEu2019
    EXPORTING
    field_name = u2018P_FILEu2019
    IMPORTING
    file_name  = p_file.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    CALL FUNCTION u2018TEXT_CONVERT_XLS_TO_SAPu2019
    EXPORTING
        I_FIELD_SEPERATOR        =
    i_line_header            =  u2018Xu2019
    i_tab_raw_data           =  it_raw       u201D WORK TABLE
    i_filename               =  p_file
    TABLES
    i_tab_converted_data     = it_datatab[]    u201CACTUAL DATA
    EXCEPTIONS
    conversion_failed        = 1
    OTHERS                   = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    END-OF-SELECTION.
    END-OF-SELECTION.
    LOOP AT it_datatab INTO wa_datatab.
    WRITE:/ wa_datatab-col1,
    wa_datatab-col2,
    wa_datatab-col3.
    ENDLOOP.
    &u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
    *& Report  UPLOAD_EXCEL                                                *
    &u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
    *& Upload and excel file into an internal table using the following    *
    *& function module: ALSM_EXCEL_TO_INTERNAL_TABLE                       *
    &u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
    REPORT  UPLOAD_EXCEL no standard page heading.
    *Data Declaration
    *u2014u2014u2014u2014u2014-
    data: itab like alsmex_tabline occurs 0 with header line.
    Has the following format:
                Row number   | Colum Number   |   Value
                u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
         i.e.     1                 1             Name1
                  2                 1             Joe
    TYPES: Begin of t_record,
    name1 like itab-value,
    name2 like itab-value,
    age   like itab-value,
    End of t_record.
    DATA: it_record type standard table of t_record initial size 0,
    wa_record type t_record.
    DATA: gd_currentrow type i.
    *Selection Screen Declaration
    *u2014u2014u2014u2014u2014u2014u2014u2014u2014-
    PARAMETER p_infile like rlgrap-filename.
    *START OF SELECTION
    call function u2018ALSM_EXCEL_TO_INTERNAL_TABLEu2019
    exporting
    filename                = p_infile
    i_begin_col             = u20181u2032
    i_begin_row             = u20182u2032  u201CDo not require headings
    i_end_col               = u201814u2032
    i_end_row               = u201831u2032
    tables
    intern                  = itab
    exceptions
    inconsistent_parameters = 1
    upload_ole              = 2
    others                  = 3.
    if sy-subrc <> 0.
    message e010(zz) with text-001. u201CProblem uploading Excel Spreadsheet
    endif.
    Sort table by rows and colums
    sort itab by row col.
    Get first row retrieved
    read table itab index 1.
    Set first row retrieved to current row
    gd_currentrow = itab-row.
    loop at itab.
      Reset values for next row
    if itab-row ne gd_currentrow.
    append wa_record to it_record.
    clear wa_record.
    gd_currentrow = itab-row.
    endif.
    case itab-col.
    when u20180001u2032.                              u201CFirst name
    wa_record-name1 = itab-value.
    when u20180002u2032.                              u201CSurname
    wa_record-name2 = itab-value.
    when u20180003u2032.                              u201CAge
    wa_record-age   = itab-value.
    endcase.
    endloop.
    append wa_record to it_record.
    *!! Excel data is now contained within the internal table IT_RECORD
    Display report data for illustration purposes
    loop at it_record into wa_record.
    write:/     sy-vline,
    (10) wa_record-name1, sy-vline,
    (10) wa_record-name2, sy-vline,
    (10) wa_record-age, sy-vline.
    endloop.

  • Custom TCode for Excel File Upload/Import - WebGUI Error

    We get an ABAP runtime error when uploading an excel file with a custom tcode using WebGUI.  It works ok with WinGUI.  Any ideas what could be causing that error?
    Runtime Errors         RAISE_EXCEPTION
    Date and Time          01/05/2011 17:27:16
    Short text
         Exception condition "JAVABEANNOTSUPPORTED" raised.
    What happened?
         The current ABAP/4 program encountered an unexpected
         situation.
    What can you do?
         Note down which actions and inputs caused the error.
         To process the problem further, contact you SAP system
         administrator.
         Using Transaction ST22 for ABAP Dump Analysis, you can look
         at and manage termination messages, and you can also
         keep them for a long time.
    Error analysis
         A RAISE statement in the program "C_OI_CONTAINER_CONTROL_CREATORCP" raised the
          exception
         condition "JAVABEANNOTSUPPORTED".
         Since the exception was not intercepted by a superior
         program, processing was terminated.

    You can use the below code. One more thing while running make sure there is no unsaved excel sheet open in your system.
    FORM sub_create_container .
    Create Instance control for container
      CALL METHOD c_oi_container_control_creator=>get_container_control
        IMPORTING
          control = iref_control
          error   = iref_error.
      IF iref_error->has_failed = c_check.
        CALL METHOD iref_error->raise_message
          EXPORTING
            type = 'E'.
      ENDIF.
    Create generic container linked to container in screen 100
      CREATE OBJECT oref_container
        EXPORTING
          container_name              = 'CONT'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
      IF sy-subrc <> 0.
        MESSAGE e000 WITH 'Error while creating container'(012).
      ENDIF.
    Establish connection to GUI Control
      CALL METHOD iref_control->init_control
        EXPORTING
          inplace_enabled      = c_check
          r3_application_name  = 'EXCEL CONTAINER'
          parent               = oref_container
        IMPORTING
          error                = iref_error
        EXCEPTIONS
          javabeannotsupported = 1
          OTHERS               = 2.
      IF iref_error->has_failed = c_check.
        CALL METHOD iref_error->raise_message
          EXPORTING
            type = 'E'.
      ENDIF.
    Create Document Proxy
      CALL METHOD iref_control->get_document_proxy
        EXPORTING
          document_type  = soi_doctype_excel_sheet
        IMPORTING
          document_proxy = iref_document
          error          = iref_error.
      IF iref_error->has_failed = c_check.
        CALL METHOD iref_error->raise_message
          EXPORTING
            type = 'E'.
      ENDIF.
    ENDFORM.                    " SUB_CREATE_CONTAINER
    FORM sub_create_document  USING    p_sheet TYPE i.
      DATA:  l_title   TYPE char40,
              l_char    TYPE char2,
              l_time    TYPE i,
              l_sheet   TYPE char12.
    Calculate the number of sheets to be created
      l_time = p_sheet - 1.
      CONCATENATE 'Assembly Table'(015) v_char INTO l_title
      SEPARATED BY space.
    Create document
      CALL METHOD iref_document->create_document                 " Open use Open_document method
        EXPORTING
          open_inplace   = c_check
          document_title = l_title
          no_flush       = c_check
        IMPORTING
          error          = iref_error.
    Open Spreadsheet interface
      CALL METHOD iref_document->get_spreadsheet_interface
        EXPORTING
          no_flush        = c_check
        IMPORTING
          sheet_interface = iref_spreadsheet
          error           = iref_error.
    Get number of sheets
      CALL METHOD iref_spreadsheet->get_sheets
        EXPORTING
          no_flush = c_check
        IMPORTING
          sheets   = i_sheets
          error    = iref_error.
    Reaname he sheet
      READ TABLE i_sheets INTO wa_sheets INDEX 1.
      l_char = p_sheet.
      CONCATENATE 'Sheet' l_char INTO l_sheet.
      CALL METHOD iref_spreadsheet->set_sheet_name
        EXPORTING
          newname  = l_sheet
          oldname  = wa_sheets-sheet_name
          no_flush = c_check
        IMPORTING
          error    = iref_error.
      REFRESH i_sheets.
      CLEAR: l_char,
             l_sheet.
    Add sheets
      DO l_time TIMES.
        l_char = sy-index.
        l_char = p_sheet - l_char.
        CONCATENATE 'Sheet' l_char INTO l_sheet.
        CALL METHOD iref_spreadsheet->add_sheet
          EXPORTING
            name     = l_sheet
            no_flush = c_check
          IMPORTING
            error    = iref_error.
      ENDDO.
    Get number of sheets
      CALL METHOD iref_spreadsheet->get_sheets
        EXPORTING
          no_flush = c_check
        IMPORTING
          sheets   = i_sheets
          error    = iref_error.
      SORT i_sheets BY sheet_name DESCENDING.
    ENDFORM.                    " SUB_CREATE_DOCUMENT
    FORM sub_save_document .
      DATA: l_changed     TYPE int4.
    Save the document
      CALL METHOD iref_document->save_as
        EXPORTING
          file_name = p_file
          no_flush  = c_check
        IMPORTING
          error     = iref_error.
    Close the document
      CALL METHOD iref_document->close_document
        EXPORTING
          do_save     = c_check
          no_flush    = ''
        IMPORTING
          has_changed = l_changed
          error       = iref_error.
    ENDFORM.                    " SUB_SAVE_DOCUMENT
    Thanks
    Subhankar

  • Can't find "save as" for excel file in Xcelsius

    Hello All
    I have created a dashboard using Live Office. I made some changes in my excel which is in my dashboard. Now I want to save the excel from xcelsius to my desktop. But I don't see any save as option in excel sheet inside my xcelsius file. I can import the excel files from my desktop but I don't see any option for exporting my excel to my desktop with Live Office connections. Is there any way to do this? Please help....
    Thanks
    Raghavendra.G

    Hi Raghavendra,
                     Another way is: you can save the excel to BOE using 'Save to BOE' button in Live office tab and then open the excel in BOE and save it where ever you need it.
    Regards,
    Sanjay
    Edited by: sanjay.madala on Jan 13, 2011 1:06 PM

  • LSMW Errors for Excel file upload

    Hi all,
    We've loaded an Excel file with 20,000+ records into SAP using LSMW and a background run. However, the LSMW returned errors for about 2,000 of those records and seems to have processed the other 18,000. Questions as follows:
    1. Is there a way to extract the 2000 records into another Excel file?
    2. If so, how can I isolate the 2000 records so that I can reload them with correct information?  I do not want to have to go through each record one by one to find them.
    3. How can I identify what the problem was for a record that produced an error?
    Thanks in advance. Points will be awarded for helpful answers.

    u have used LSMW which will normally create a Session which will be executed using SM35 in background mode...Goto the session and click on errors...the errors are been shown up..U can correct there itself or else prepare another one with correct data and do a lsmw once again.

  • Is WebI the best tool for Excel file reporting?

    For many years we use BO/DeskI to produce reports.  The data source was DB2.
    From time to time, the users find the production so user friendly the begin to use DeskI for reports with Excel files for input.
    They create hundreads of reports with the 'Rich client' service.
    Now we are upgrading to WebI and the Rich Client will be on the server.  The BO Service server is a small machine, because of the licences we have.
    We have bigs questions :
    is WebI/Rich Client still a good solution for Reporting for external file like Excel?
    Is this solution will create a ressource problem on the server when more then 100 peoples will connect and use the service?
    Should we limite the external file for the rich client  location on the server (we do not want to install any more software on client computers like with DeskI)?  
    Is a product like Crystal Report a better solution for office reporting (file like Excel, Access, text file, etc)?
    In one word, is WebI the best solution for office reporting or we should go for a product like Crystal (server, ressources and licence limitation)?
    Thanks

    You should not compare Crystal Reports with Web Intelligence. If you were using DeskI then you should go with WebI because that means you are using ad-hoc reporting. WebI is the new DeskI. Crystal Reports is used for other purposes not for Ad-hoc reporting. You use Crystal for pixel perfect reports not for analysis.
    For excel data sources, are you going to use Excel with universe design or directly in WebI?
    If you are going to use it with Universe, then you will have some connection limitations. If more than one user tries to refresh the report based on excel universe, you will get an error.
    On the other hand, if you will use the excel directly in WebI, you cannot refresh the report on InfoView (BIlaunch pad).
    As you mentioned with not installing client tools then your choice will be the first one excel universes.
    Hope this helps.

  • Function module for Excel file upload

    Hi,
    I am new to APO technical. My requirement is upload excel file data. However commonly used FM in R/3 for uploading excel files from presentation server are not avaliable ( KCD_EXCEL_OLE_TO_INT_CONVERT , ALSM_EXCEL_TO_INTERNAL_TABLE , TEXT_CONVERT_XLS_TO_SAP etc) in APO system(SCM 4.0 version).
    Let me know if there are any other FM avaliable and procedure to upload the excel files in APO?
    Please let me know if you require any further details.
    Regards
    Reddy

    Hi
    The data structures in APO differ from R/3 (e.g. data is held in livecache tables) and hence the FM's you mention will not work in APO.
    Try looking at the Wiki pages as there is a lot of useful information there for you, e.g. this example code to download and upload data between Excel and APO:
    Link: [Download SCM data into Excel|http://wiki.sdn.sap.com/wiki/display/SCM/DownloadPlanningdataintoexcel]
    Have a look around the Wiki, hopefully it will help you out
    Regards
    Ian

  • Change default app for excel files

    Is there a way to change the default app for viewing Excel files sent as email attachments on iphones and ipads? Currently if you tap the file it opens in Quick Look, tap and hold gives other options to open the file. I want to set the tap affect to open the file in numbers instead.

    Any email attachment should give you the option of opening it in any app that can at a minimum view the file. In the File function (i.e. by tapping the "box with an arrow" icon), then swiping to the left and tapping "More", you can turn off a handful of apps from appearing, but also change the order in which they appear on the pop up making your app of choice a little quicker to access. Also, if you tap and hold on the attachment icon in the message, it opens the same functionality with going through the quick look.

  • Save as dialog window for excel file save ....

    hi!
    i have a jsp that displays all the report names to the clients and when clicked on the report downloads an excel file and saves to the client machine.this is accomplished by calling a servlet that sets the content type as "application/octet-stream" and setting the header as "setHeader("Content-Disposition", "attachment; filename=myExcel.xls")
    and writing the bytes to the excel file.works just perfect.
    now if you open the excel file and make changes to it and try to save it with a different name by clicking 'save as' option from file menu, the 'save as file type' by default shows "text" instead of excel worksheet.
    have you guys come across this problem anytime....
    kindly let me know you have any suggestions ..
    thanks in advance,
    /rahul

    one more point:
    the save as list box displays "myExcel.xls"(with quotes) where it should have displayed simply myExcel.

  • File path for excel file

    Hi Everyone,
    I am writing and reading data from an Excel file (see code) and it works but I have to specify the path in the script and if I want to change the file I have to change the file path in the code.
    I would like to create a window that pops and asks the user to pick the excel file he wants to work with, copy the path and replace
    "C:\Users\Public\Documents\National Instruments\DIAdem 2012\Documents\Constant Radius\USED\Test.xlsx" by that path.
    I hope someone can give me a hand with this.....
    Thanks
    Leo
    Dim Excel,a Set Excel = CreateObject("Excel.Application") Excel.Visible = TRUE Call Excel.Workbooks.Open("C:\Users\Public\Documents\National Instruments\DIAdem 2012\Documents\Constant Radius\USED\Test.xlsx") a=Excel.ActiveSheet.Cells(1,1).Value Excel.ActiveSheet.Cells(1,4).Value = RV1(1) Excel.ActiveSheet.Cells(2,4).Value = RV1(2) Excel.ActiveSheet.Cells(3,4).Value = RV1(3) Excel.ActiveSheet.Cells(4,4).Value = RV1(4) Excel.ActiveSheet.Cells(5,4).Value = RV1(5) Excel.ActiveSheet.Cells(6,4).Value = RV1(6) Excel.ActiveSheet.Cells(7,4).Value = RV1(8) Excel.ActiveSheet.Parent.Saved = FALSE Excel.Quit Set Excel = Nothing
    Solved!
    Go to Solution.

    Dim Excel,a
    Set Excel = CreateObject("Excel.Application")
    Excel.Visible = TRUE
    Call Excel.Workbooks.Open("C:\Users\Public\Documents\National Instruments\DIAdem 2012\Documents\Constant Radius\USED\Test.xlsx")
    a=Excel.ActiveSheet.Cells(1,1).Value
    Excel.ActiveSheet.Cells(1,4).Value = RV1(1)
    Excel.ActiveSheet.Cells(2,4).Value = RV1(2)
    Excel.ActiveSheet.Cells(3,4).Value = RV1(3)
    Excel.ActiveSheet.Cells(4,4).Value = RV1(4)
    Excel.ActiveSheet.Cells(5,4).Value = RV1(5)
    Excel.ActiveSheet.Cells(6,4).Value = RV1(6)
    Excel.ActiveSheet.Cells(7,4).Value = RV1(8)
    Excel.ActiveSheet.Parent.Saved = FALSE
    Excel.Quit
    Set Excel = Nothing
     Hi,
    I am just repasting the code. I don't know what happened earlier but everything went on the same line, sorry

  • How to create a passsword protection for EXCEL file

    Hi,
    I have created EXCEL, CSV and DBF file generation through Oracle PL/SQL. Now my client expecting to create a password protection. Can anyone tell me how to create a passsword protected file?
    Cheers,
    San

    How to protect an EXCEL file is not an Oracle issue and I don't think you can do this through PL/SQL. It's part of MS Office maintenance itself and it depends on the version:
    http://benosullivan.co.uk/windows/how-to-password-protect-excel-2010-workbooks/
    Werner

Maybe you are looking for

  • Method in WF not executing..

    Hi, Can anyone tell me whether to include Delegated Object (ZDISCON) or Standard Object(DISCONNECT)  in the  activity step type of my Workflow (WS9000009). The issue is: The reciever is being called while trying to create a event in SWUE. But the Fun

  • Photo Stream only Uploading Some Photos

    Has anyone else noticed this?  If I take a picture on my iPhone 5, sometimes it shows in my camera roll and in Photo Stream.  Sometimes, it only shows in my camera roll.  Likewise, the Photo Stream library on my iPad 4 isn't picking up the new photos

  • Why is my macbook pro so slow?, Why is my macbook pro so slow?

    After a year of my mac working perfectly, and extremely quickly, a few weeks ago my mac became indreibly slow. There always seems to be a loading circle, and I hve no idea what is the cause. Please could someone help?

  • Why should I...

    I have a question...how would you convince someone that they need the new iphone 4? I'm looking to buy a new phone but why should i get the new iphone?

  • Garbled (skipping) songs on iPod and iTunes back again after upgrade

    I orginally posted about this back in September. Some of my songs all of a sudden became garbled or were skipping on both my iPod and in iTunes. The CD's don't skip. At that time a new version on iTunes was available and some iPod genious in this for