Converting an Excel file into a CSV with the DI API

Hello everyone,
it's my first post and also my first project with SBO, As the topic's header implies I have to write a program which converts an excel sheet into a CSV file, I have been reading a little about the DI API, and I would like to have further information about how to use the DI to access file data and/or alter it, other than what is already listed in the tutorials.
Thanks in advance.

Hi Amin,
Unfortunately I am not aware of any way to this using only the DI API, it will be neccesary to include some other APIs or manual work.
Off the top of my head I can only think of two workarounds to this:
- Using the recordset and Excel combined. Read all the data from one column in a table and write it to a column in an Excel file possibly using a loop. Once the process of copying all desired columns and their data is complete, save the file as .csv using the excel API. I'm afraid I don't have an example of this. (It also may be possible using Microsofts SMO or another database API rather than the recordset.)
With this approach the drawback is it might take a long time to figure out and develop in the short term, but in the long term would save alot of manual work as it could be automatic.
- The alternative is unfortunately a manual approach: Simply run a query on the table, and then copy all the values from a column and paste it into the excel file.
This has no short term work but is alot of manual work in the long term.
Hope this is useful,
Regards,
Niall

Similar Messages

  • How do I convert an Excel file into a pdf?

    how do I convert an Excel file into a pdf?

    Hi tomduffey,
    You can either use Create pdf service or Adobe Acrobat software for the purpose.
    Please refer -
    Using Create PDF service : https://www.acrobat.com/createpdf/en_GB/convert-excel-to-pdf-converter.html
    Using Adobe Acrobat : http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/acrobat/pdfs/adobe- acrobat-xi-create-pdf-files-tutorial-ue.pdf

  • Conversion of an excel file into a CSV 2.0 file for uploading in CCM 2.0

    Hi guys,
    We are downloading content from SAP R/3 into an excel spread sheet.
    We are uploading this content in a CSV file 2.0 into CCM 2.0
    the csv file we use today we are arming manualy because of the difference in structure between excel and CSV 2.0. We would like to be able to convert easily the excel file in a CSV file. How can one do this.
    Example of our csv-file:
    SAP CATALOG CSV 2.0 <,>FULL,,,,,,,,,,,,,,
    DEFAULTS,ES,,,,,,,,,,,,,,
    Model,,,,,,,,,,,,,,,
    DataType,String_ID,String,,,,,,,,,,,,,
    Characteristic,Z_COMPANY,/CCM/ID,,,,,,,,,,,,,
    Characteristic,Z_DOC_TYPE,/CCM/ID,,,,,,,,,,,,,
    Characteristic,Z_DATE,STRING_ID,,,,,,,,,,,,,
    Characteristic,Z_SUPPLIER_ID,/CCM/ID,,,,,,,,,,,,,
    Characteristic,Z_MARCA,/CCM/DESCRIPTION,,,,,,,,,,,,,
    Schema,ENTEL,Z_COMPANY,Z_DOC_TYPE,Z_DATE,Z_SUPPLIER_ID,Z_MARCA,{}ENTEL,,,,,,,,,,,
    Category,PRODUCTOS ENTEL,,,,{}ENTEL PRODUCTS,,,,,,,,,,
    Category,A.B.G INGENIERIA S.A.,PRODUCTOS ENTEL,,{}A.B.G. INGENIERIA S.A.,,,,,,,,,,,
    Content,,,,,,,,,,,,,,,
    ItemValuation,parent cty,/ccm/supplier_part_no,/ccm/base_uom,/ccm/order_unit,/ccm/price[1]#/ccm/amount,/ccm/price[1]#/ccm/currency_code,Z_DOC_TYPE,/ccm/supplier_name,/ccm/contract_id,/ccm/contract_item_id,Z_MARCA,/ccm/short_description,Z_SUPPLIER_ID,/ccm/product_group,/ccm/product_id,Z_DATE,Z_COMPANY
    1,A.B.G INGENIERIA S.A.#ENTEL,61,PCE,PCE,1,UF,ZSV0,A.B.G INGENIERIA S.A.,4410000181,10,ALL,Insp.TTecnica Terreno Servicios Privado,096898120K,A0307S001,3001870,20060111,ENT
    Any advice is welcome,
    Thanks in advance
    Aart

    Hi,
    We are also facing same issue like when we saved data was in CSV formate but now when we open the file then it comes in Text formate.
    Currently file extension is .xls but we tried to change that to .csv but still it opening in text only...
    Regards,

  • How to Read data from excel file without converting a excel file into .csv or any other format

    Hello,
    Can somebody suggest me how to read from an excel file (consisting of 10 work sheets) to an array?
    Thanks,
    She

    You have to be careful when using the spreadsheet-files vi's.  They are located in the Functions Palette under File IO, you will find "Write To / Read From Spreadsheet File.vi"s. 
    Here is what the Context Help says about the vi function:
    "Reads a specified number of lines or rows from a numeric text file beginning at a specified character offset and converts the data to a 2D, single-precision array of numbers. You optionally can transpose the array. The VI opens the file before reading from it and closes it afterwards. You can use this VI to read a spreadsheet file saved in text format. This VI calls the Spreadsheet String to Array function to convert the data. "
    This is quick & easy when the spreadsheet is all the same format.  You can set the format to string as well.  HOWEVER...  you do have to convert the Excel spreadsheet to text before using it.
    I haven't experimented with the Active-X, but it may look as the way to go if you have combination text / numeric values in the spreadsheet.
    If you did convert it to text, then you can use array functions as well and treating the file as an array of strings (see very brief example attached).  The example is to illustrate a point only  
    JLV
    Attachments:
    starting point for spreadsheet.vi ‏28 KB

  • Uploading excel file into internal table with field length more than 255

    I am trying to upload the data from an excel file through function module 'TEXT_CONVERT_XLS_TO_SAP'.
    I have tested by changing the field type from string, and char2000.
    But it is accepting only 255 chars from the cell content.
    How to get the total content of the field if it is more than 255 char.

    hi,
      you can use any of the following procedures:
    For uploading data from excel to internal table refer standard report  RC1TCG3Z  in se38 :
                                               or
    You can use the FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' itself. Please check if you have done it this way . But,  this FM can be a little time consuming if the excel has large data, so you can use the FM u2018GUI_UPLOADu2019.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
            EXPORTING
              filename                = p_file1
              i_begin_col          = l_b1
              i_begin_row        = l_c1
             i_end_col               = l_b2
             i_end_row             = l_c2
           TABLES
              intern                  = lt_data
            EXCEPTIONS
             inconsistent_parameters = 1
            upload_ole              = 2
              OTHERS                  = 3.
          IF sy-subrc <> 0.
            MESSAGE e018 DISPLAY LIKE 'i'.
         ENDIF.
    *---Removing the first heading fields from the file.
          IF NOT lt_data[] IS INITIAL.
            LOOP AT lt_data INTO lwa_data WHERE row = '0001'.
              DELETE lt_data.
              CLEAR lwa_data.
            ENDLOOP.
    *---Inserting the data from file the internal table
            LOOP AT lt_data INTO lwa_data.
              CASE lwa_data-col.
                WHEN 1.
                  wa_file_wicopa-serial = lwa_data-value.
                WHEN 2.
                  wa_file_wicopa-blart = lwa_data-value.
                WHEN 3.
                  wa_file_wicopa-bldat = lwa_data-value.
                WHEN 4.
                  wa_file_wicopa-budat = lwa_data-value.
              ENDCASE.
              AT END OF row.
                APPEND wa_file_wicopa TO gt_file_wicopa.
                CLEAR wa_file_wicopa.
              ENDAT.
              CLEAR lwa_data.
            ENDLOOP.
          ENDIF.
        ENDIF.
                                                or
    DATA: it_test TYPE STANDARD TABLE OF alsmex_tabline WITH HEADER LINE.
    DATA :v_start_col TYPE i VALUE '1',
          v_start_row TYPE i VALUE '1',
          v_end_col TYPE i VALUE '256',
          v_end_row TYPE i VALUE '65536',
          v_text TYPE repti.
    * Funtion Module to upload values from excel to the Internal table
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = p_file
          i_begin_col             = v_start_col
          i_begin_row             = v_start_row
          i_end_col               = v_end_col
          i_end_row               = v_end_row
        TABLES
          intern                  = it_test
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
                             Or
    You can use FM u201CTEXT_CONVERT_XLS_TO_SAPu201D.
    DATA : i_raw TYPE truxs_t_text_data.
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_field_seperator          = 'X'
          i_tab_raw_data             = i_raw
          i_filename                 = p_path
        TABLES
          i_tab_converted_data       = itab
    EXCEPTIONS
       conversion_failed          = 1
       OTHERS                     = 2
    hope it will help u
    regards
    rahul

  • Convert Windows Excel File into a Mac Excel File

    I have transferred my Workout Journal spread sheet over from my girlfriends PC (which I use often) . Problem is, I can't access it the file on my Mac in Excel or Numbers. It's currently in .xlsx format, I tried simply renaming as an .xls file but it wouldn't open properly on either application.
    How do I convert this file Windows file into a Mac readable file. Thanks
    All help appreciated

    You cannot read Excel ".xlsx" form files using older versions of Microsoft Excel than the 2011 version of Office for Mac or at all in Numbers.  You will either have to Upgrade your version of Excel on your Mac to "Office for Mac 2011", OR go back to your girlfriend's computer and resave the file using "Save As ..." and there select the ".xls" compatibility format instead of the default ".xlsx" version that the newer versions of Excel use.

  • What are people using to convert .3gp video files into something compatible with iMovie? Does Apple have SW to do this?

    I am trying to find the best and safest way to convert .3gp video from my Blackberry into a file format that iMovie will recognize.  I see lots of potential downloads, but I am hoping for some recommendations on which SW is most helpful.  Thanks.

    There is a free App called MPEG Streamclip from Squared 5. You can drag your .3gp into MPEG Streamclip. Then FILE/EXPORT TO QUICKTIME.
    For HD sizes (1280x720 or 1920x1080), choose Apple Intermediate Codec as the Video Codec.
    For smaller sizes, you can also use Apple Intermediate Codec, but h.264 will also work and will give a smaller file size.
    Then import this new file into iMovie using FILE/IMPORT MOVIES

  • How do I add a new worksheet to an excell file utilizing a template with the report generation toolkit?

    Hello,
    My vi is gathering data from a piece of machinery. At varrious points durring the process, my vi must create printable reports. I am using the report generation tool kit to do this. What I want to do is for every report generated durring the run, add it as a new worksheet in an Excell workbook. My excell template works fine for the initial master report and I can add new data to new worksheets. What I am having a problem figuring out is how do I add the new data to a new worksheet using an excel template? I have 5 different reports that need to be generated at different times with some more often than others. I would like all these reports to be in the
    same master excel file. Thanks in advance
    -Greg
    Gregory Osenbach, CLA
    Fluke

    Hi Greg,
    There is no built-in support in LabVIEW to add a new worksheet to an existing Excel report simply because this functionality does not exist in the Excel application itself.
    My suggestion would be to open up the template you wish to use for the new worksheet. Copy the cells from the template and paste them into your new worksheet that you've created. Then close the original template and you have another copy of the template in which you can populate with data values.
    I have attached an example program of how to Copy and Paste a Cell in Microsoft 97 Using ActiveX in LabVIEW to this post. Hope this helps!
    Kileen C.
    Applications Engineer
    National Instruments
    Attachments:
    XL_cell_copy_and_paste.llb ‏76 KB

  • Uploading excel files into Web UI

    We are following the blog http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebUI-UploadingdatafromExcelfiles
    to upload excel files into Web UI.
    The  problem which we are facing is that the values are not getting populated in the text are and in the
    event handler EH_ONSERVEREVENT, no values are being populated in lt_items table.
    It would be great if someone could help us with this.

    Hi Nidhi,
    I have tried the blog but due to some reason, could not get it worked out.
    But, If U are ok to use CSV input files, instead of excel, U can use the standard component "GS_FILE_UPLOAD" as a popup and upload the files into the required assignment blocks.

  • I have purchased the program and now how do I convert a PDF file into excel?

    I have purchased the program and now how do I convert a PDF file into excel?

    Hi johnhnk2,
    Please see Getting Started with ExportPDF | Adobe Community.
    That document will tell you what you need to know to get started. Please note, however, that it can take 24-48 hours for an order to process fully.
    Best,
    Sara

  • My mac is converting Word and Excel files into Pages and Numbers files when I click to open them (or download and open them) from an email. I do I get this to stop? It's really aggravating.

    My mac is converting Word and Excel files into Pages and Numbers files when I click to open them from an email. Downloading them and opening them doesn't help. How do I make this stop? I don't use iLife and don't want to; my clients are using Office and it's easier for me, except when I have to copy and paste everything they send me from an iLife file back to Word and Excel. Help!!! It's like Apple has become Microsoft, forcing us to use their apps.

    Do you have Word & Excel installed, if yes, navigate in the finder to an example of each, right click and select 'Get Info' scroll down to 'Open With' and select the appropriate program, check the box that says 'Change All'

  • How to Load the data from excel file(Extension is .CSV) into the temp.table

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Hello Sachin,
    You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
    Instead of copy values into forms you can save them in your temporary table.
    Kind regards,
    Alex
    If someone's helpful or correct please mark it accordingly.

  • I've become increasingly frustrated with the ipad adobe app. I've subscribed to be able to convert my pdf files into word documents and it has yet to work I've paid for a service that does not work which in turn makes me a disgruntled customer to say the

    I've become increasingly frustrated with the ipad adobe app. I've subscribed to be able to convert my pdf files into word documents and it has yet to work I've paid for a service that does not work which in turn makes me a disgruntled customer to say the least very disappointed with such horrible service

    Which service did you subscribe to?  Adobe PDF Pack?
    Once I know the service that you subscribed to, I can move this post to the right forum so that you can get in touch with the folks who can assist you.

  • My goal: "convert into pdf" -- the file is instantly saved with the same name as pdf. feasible?

    Good evening dear experts,
    i use Adobe Acrobat 9 pro extend to convert word, ppt, jepgs etc. into pdfs.
    No if i
    1) convert a ppt into a pdf: it asks --> "save as" --> converts --> opens the file
    2) convert a jpeg into a pdf: it instantly --> opens the file as pdf --> i need to save it manual under "save as"
    In both cases i want to
    my goal: "convert into pdf" --> the file is instantly saved with the same name as pdf
    WITHOUT asking me "save as" + "opening of the file".
    Is the possible, and if yes, HOW ?
    A fast answer is very very much appreciated, for i have to convert hundreds of files tonight in order to get it into 1 pdf
    Thx and greetings from Germany,
    Julia

    We are nearly there!
    A] - righclick "convert-to-method": @Bill: thx again, your approach worked for ppt, doc-files etc.
    2 problems:
    1) exception: for jpegs/bmps it doesn't work (the file is still opened after conversion, strange).
    2) the output-folder. it only accepts the standard "output-folder documents/*.pdf" (which is a step further but not my end-goal). If i choose another output-folder via "browse", this setting is NOT SAVED (even after clicking on "accept" + "ok").
    my goal: the the file should be automatically saved in THE SAME folder the original file is in (seems that can't be achieved and the standard folder is the only thing where to convert in?).
    Personal background for understanding: i have many folders with several ppts in it. Once i send it out to a customer, i always have to convert it into a pdf. thats why i want to save time (i know that i can convert it directly + send per mail, but i want an up-to-date copy of the pdf in the folder as well).
    B] - "the automated solution"- @Sandeep:
    i just watched your link http://tv.adobe.com/watch/acrobat-tips-and-tricks/automating-tasks-in-acrobat/
    about batch processing and i think its really helpful if i want to convert ALL of the files in one folder.
    1 question regarding this: are the subfolders also affected?
    As i understood from the video, i choose 1 "watched folder" and a "destination folder" (can be the same). E.g i have 1 big folder "designs" with many subfolders. I create a batch converting ppts to pdf to "the same folder" Once i run my batch, it converts ppts in the chosen folder "designs" + all subfolders into the same folder, right?
    If this is the case, i get too many pdfs, for i only need the latest ppt-version to be converted (copies of old ppts are also in the files) ;(.
    Do you have an idea how can i solve this?
    Now we are very near to the end-solution of my goal:
    i need this option "to the same folder" in my general settings when i convert a file via right-click. ATM it only works with the standard-folder documents/*.pdf
    In A], my files are now instantly saved with the same name in 1 specific folder. I would be completely happy, if this folder would be alwys the same as the one with the original file (and not 1 specific folder)
    2nd problem with a]: it does not apply to picture files (bmp, jpegs..)
    So if we could solve this, i would be a completely happy girl
    Guys, you are great, thx again for the whole struggle with my concerns!!

  • I bought Numbers because my Excel files would not work with Mavericks. How can I import a non-functioning Excel file into numbers? (As of now, the file NAME transfers but data is not.) but

    I bought Numbers because my Excel files would not work with Mavericks. How can I import a non-functioning Excel file into numbers? (As of now, the file NAME transfers but data does not.)

    HI Dave,
    I'm surprised you get no message when you attempt opening the Excel document in Numbers.
    I'm assuming Numbers 3.1, since you are running Mavericks.
    Does the Numbers file that opens show any content?
    Does it contain a table?
    How large?
    Does it contain more than one tab (indicating more than one sheet)?
    Do those other tabs contain a table?
    Have you checked those tables for data content?
    There have been cases in the past of imported documents opening with white text on a white background, giving the appearance of containing nothing. Check for this by selecting a block of cells, then applying a Fill colour or a Text colour using the Format button (paintbrush).
    I'd also suggest attempting to open the Excel files using LibreOffice, which can be downloaded from the linked website.
    Regards,
    Barry

Maybe you are looking for

  • Other folders in Mail for Excahange

    Hi I just bought E 71 and configured Mail for exchange. It is working perfect. I have many folders in my exchange email account and all are handled by exchange rules and my problem is i am getting only those emails which are coming in inbox and not g

  • Push notifications dont Work

    Push notifications are not working at all. They used to come in but very sparingly. They don't come in at all now. Im using push enabled apps(Beejive & Boxcar). I have notifications enabled on the ipod and both apps settings are set to push enabled.

  • Office Web Apps farm - how to make it high available

    Hi there, I have deployed OWAs for Lync 2013 with two servers in one farm. When I was testing, e.g. the case when other server is down I found out the following error: Log Name:      Microsoft Office Web Apps Source:        Office Web Apps Date:     

  • HT1981 I will use my 110V MacBook in the Philippines which has 220V sockets. Will the World Travel Adapter Kit help me?

    I will use my 110V MacBook in the Philippines which has 220V sockets. Will the World Travel Adapter Kit help me?

  • Setting invoice lock when creating contract object

    Hello, For specific contract objects we don't want to create an invoice if a document is posted on there. In the contract object you have a field called invoice locking. When i set this manually it is working fine, so now i want this to be set automa