OLE Automation EXCEL.APPLICATION OPEN === CSV file

Hi Gurus,
no probs to open a XLS file via
      CREATE OBJECT grc_excel 'EXCEL.APPLICATION'.
      SET PROPERTY OF grc_excel  'VISIBLE' = 1.
      CALL METHOD OF grc_excel 'WORKBOOKS' = grc_wbook.
Open Workbook
      CALL METHOD OF grc_wbook 'Open'
        EXPORTING #1 = gfd_filename.
but how to deal with CSV ? They're opened not properly.
I tried #2 = 'CSV' but no luck.
Any Idea?
Cheers
carsten

COMMA separated files are SEMICOLON separated files in German Windows systems.
This ist set in Windows System settings for regions (enhanced).
EXCEL considers this settings when running normally. CSV is stored with ; and will be loaded properly after.
In OLE mode, EXCEL does not consider this regional setting and expects COMMA
If there's no option to tell lthe open method of OLE-Excel, I must translate SEMICOLIN toCOMMA before with all risks to translate text instead of separators...
I saw some opens with #2 as parameter for "read only" but nothing regarding "separator character" (CL_RMPS_MS_OFFICE_TOOLS~GET_BUILTIN_DOC_PROPS_FROM_FIL)
Thanks & Cheers
carsten

Similar Messages

  • Calling excel to open csv file created by export within same process

    Hello All,
    I'm very new to apex and never done any javascript. My company is trying to convert this old forms programmer. What I'm trying to do for a client is to open excel with a specific template I've created that will format the data from a csv file that is exported from a report region in apex. The problem is they want it to be a single button operation. So when I press the link/ or button to export the csv file, after it is saved, then open excel with the template and let the internal excel macro format the data and chart. Any suggestions/solutions/direction will be greatly appreciated.
    Dan Walsh
    Old form

    Dear Gangadhar,
    Refer this thread and it may give idea on your issue.
        how much rows can be visible in excel sheet
    Regards,
    JP.

  • How to automatically open csv files in Excel on imac

    I am migrating back from Google Chrome to firefox and would like to have the browser automatically open csv files to Excel on my mac desktop. The step to have them saved in the download folder and then go in an open it in Excel adds an unnecessary action. In the earlier versions of Firefox on my windows machine this worked as desired. Any help will be appreciated.

    The Yahoo Finance server sends the file with the ''Content-Type: application/octet-stream'' header. This is a generic MIME type that doesn't describe the type of file. Therefore you will always see a download prompt, regardless of your download preferences.
    * [https://developer.mozilla.org/docs/Web/Security/Securing_your_site/Configuring_server_MIME_types What are MIME types? | MDN]
    To get around this issue, install the Force Content-Type add-on.
    * https://addons.mozilla.org/firefox/addon/force-content-type/
    In the Add-ons Manager, Extensions category, click the Options button next to Force Content-Type. Create two rules as follows:
    * URL: '''(.csv)$''' Old Content-Type: '''text/plain''' New Content-Type: '''text/csv'''
    * URL: '''(.csv)$''' Old Content-Type: '''application/octet-stream''' New Content-Type: '''text/csv'''
    You should then be able to select what you want to do with CSV files (i.e. open them directly rather than save), and check the "Do this automatically…" option.
    You're welcome.

  • How do I set Excel as default program to open CSV files?

    I am using a program that creates CSV files which I wish to open with Excel. Currently, the CSV files just open as a raw data sheet on my computer. Support folks said I didn't have Excel as my default program to open CSV files; How do I do this?
    Thanks,
    Kevin

    You can only set an automatic download action for CSV to open with Excel is a website sends such a file with a supported MIME type. In other cases you need to select the application to use. You can set the default application via Windows Explorer to make Firefox offer that as first choice (right click a CSV file > Open With).
    *MIME Edit: http://space.geocities.yahoo.co.jp/gl/alice0775/view/20080912/1221150790

  • Why can't I open .csv files in Excel 2013?

    We purchased (20) new machines all with Office 2013 (OEM) version.  We can no longer open .csv files with Excel 2013.  When we go to a machine with Office 2010 it opens perfectly.  The issue is with some change to Excel.  I see a lot
    of complaints on the internet about this issue.  Since we have OEM versions of Office, I am not entitled to a downgrade to 2010.  I need to know what Microsoft is doing to fix this issue, or need them to grant us rights to downgrade. 

    Hi,
    In regarding the issue, I had tested in Excel 2013 of my PC. It seems worked fine. Thus, I suggest you try to do the following methods to test.
    1. Import the CSV file into Excel 2013. Click Data tab>From Text
    http://superuser.com/questions/407082/easiest-way-to-open-csv-with-commas-in-excel
    2. Did you get en error message "SYLK: File format is not valid" when you open CSV file?
    If it was, please try to follow the link to fix the issue:
    http://support.microsoft.com/kb/323626
    3. Please try copy one of the CSV file to notepad and save it as a new name to test.
    4. You'd better upgrade the lastest patches.
    Regards,
    George Zhao
    TechNet Community Support

  • After file encryption in Windows 7, Excel cannot open .xlsx file

    I just moved all my files to a new laptop with Windows 7.  I was using Excel 2007 and Windows XP on the OLD laptop.  The NEW laptop has Windows 7 Ultimate and Excel 2010.  I turned on file encryption (via Windows File Explorer) and now I'm
    unable to open most Excel files.  
    The error message says: "Excel cannot open the file 'ABC.xlsx' because the file format or file extension is not valid.  Verify that the file has not been corrupted and that the file extension matches the format of the file."
    I can open the file just fine if I use the backup version from the old laptop.  It appears that the Windows 7 file encryption damaged the file from Excel's perspective.  No other applications are showing issues and not all .xlsx files are failing.
    Any ideas, please?
    Thanks,
    Ken

    This is not a solution but a possible work around to see/salvage the contents of your file. If you have a Google Account
    Go to Google Docs (https://docs.google.com)
    Log in with your credentials
    Upload the troublesome files (xlsx, docx etc)
    If you are lucky Google may be able to salvage their contents.
    Once uploaded, you can always download the file from Google in a variety of formats

  • Open CSV files

    I am unable to have  Safari open CSV files in my Excel 2011  (Mac). Safari will download the CSV file and when I try to open it with Excel 2011 I get the message that Excel 2011 can not open the file because the developer is unknown.
    This is very annoying.
    Firefox does allow Excel 2011 to open CSV files, but for various other reasons I would like to stay on with Safari.
    All workarounds are welcome

    ..."because the developer is unknown"
    Could you provide the exact text of the message, please?
    Are you really running OS 10.5.8?
    In the meantime, two things come to mind from your description.
    Maybe Safari has added an extra suffix to the file (beyond so that Excel doesn't recognize the file type.
    Make sure the downloaded file has a .csv only at the end.
    Maybe security is kicking in.  Can you control-click on the file and select "Open"?
    charlie

  • Excel cannot open the file

    I am trying to build a dashboard in 4.5 Professional.  When I open the Xcelsius file I get the following message "Excel cannot open the file 'im5.xlsx' because the file format or file extention is not valid.  Verify that the file has not been corrupted and that the file extention matches the format of the file"
    I went to Task Master killed Excel and then got a new message "the document 'im5.xlsx' caused a serious error the last time it was open.  Would you like to continue opening it?" If I say "Yes" the message in the first paragraph re-appears.  However, I then cannot find Excel in Task Manager again.  I therefore assume Excel is not running but the problem persist, I cannot openthe Dashboard.  Any ideas how to solve this problem?
    I run XP and Office 2007.  I have build many Dashboards on 4.5 and also run Engage 2008.
    Niel

    Hi Niel
    Can you save the Excel file as 2003 compatible and try again?
    Regards
    Charles

  • I get a message saying that "Excel cannot open the file

    Every now and then, when I try opening an Excel file, I get a message saying that "Excel cannot open the file 'file.xlsx' because the file format or the file extension is not valid. Verify that the file has not been corrupted and that the file extension
    matches the format of the file.

    I see this most often when a file has been transferred around a lot and gets corrupted due to bad sectors on hard drives, 
    bad thumb drives, etc...
    Occasionally, I find a repair utility that will....kind of....fix it. You tend to lose all formatting and usually the user 
    would have to spend more time doing than life than simply starting from scratch. If on a file server, shadow copies
    (previous versions) are a god send.
    If it happens completely randomly, does it happen more often to the same group of people? Perhaps an update malfunctioned? 
    Reinstall Office? Try XLSX Open File Tool for recovery your documents (http://www.xlsx.openfiletool.com/)
    There could be so many reasons this could happen, but all the above is where I'd start.
    Also read this
    https://groups.google.com/forum/#!topic/xlsx-viewer-download/Yf8eudHMWv8

  • How to open .csv files?

    How can I open .csv files that are sent as attachments.  I get reports sent automatically from an app that only saves them as a .csv and I cannot find a way to open them on my BB.  I've looked at a few add on software options but none of the ones I've found open .csv files.
    Any ideas? 
    Thanks 
    8703e v4.1 and Blackberry Professional Software on the server

    Sorry, but .csv files are not currently a supported format.
    Supported attachment formats for BlackBerry mail and messaging

  • Differents between open csv file by mannually and program automatically?

    Dear great master
    I haved been consfused by a problem deeply.
    Why a csv file if already open can be detected by mannually. can't be detected by program automatically.
    I verify this phenomenon by below procedure:
    First:
     Execute <simple_ErrCode_modify_by_NI2.vi>  at both computer respectively.then open csv file mannually,thus two programs both can detect the csv file already
    open. also can enter case5 and wait case5's loop.
    Second:
     Compare with First produre.firstly,execute <simple_ErrCode_modify_open_csv_atloop1.vi> in one computer , Adding while loop  after open/creat/replace file ,thus
     can maintain csv file open all the time.
     secondly,execute <simple_ErrCode_modify_by_NI2.vi> in the other computer.I find that <simple_ErrCode_modify_by_NI2.vi> cann't enter case5.
      Through above,
     I confused that why program can detect csv file already open by mannually.
     cann't detect csv file already open by the other pragram open.
    Why have thus two kinds of mechanism in labview .
      Can who great master help me and answer me .
    mentioned program attached.
     Thanks earnestly.
    Attachments:
    ReadWrite_same_csvfile.zip ‏61 KB

    If I understand your question, the answer lies in the access programs request when they open files. First, a program can have read-only, write-only or read-write access. Second, they can specify exclusive or nonexclusive access to a file. If a program requests and get exclusive access to a file, no other process can open it for any reason.
    Now when you open a file manually, what you are really doing is opening it using the default program specified in Windows. So its a matter of how that program opens files.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Excel cannot open the file beacuse the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file [help]

    Hi,
    I have a excel file that I have been using since beginning of year.
    Yesterday, I tried to open it but a message comes out "
    Excel cannot open the file beacuse the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file"
    After I click yes, the page is blank. The file is about 400kb in size.
    I have try open and repair and third party repair program and not working also.
    I would appreciate a lot if you can help me.
    Thank you very much.

    Per your post, this problem might be caused by malware on the affected machine.
    http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2013/09/07/quot-cannot-open-the-file-because-the-file-format-or-extension-is-invalid-quot-opening-office-files.aspx
    In order to clean your machine, run Microsoft Safety Scanner (http://www.microsoft.com/security/scanner/en-us/default.aspx) to kill the malware, and then repair Excel file itself.
    If this is not the case, feel free to post back and let me know. Thanks.
    Tony Chen
    TechNet Community Support
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Excel cannot open the file 'file.xlsx' because the file format

    Every now and then, when I try opening an Excel file, I get a message saying that "Excel cannot open the file 'file.xlsx' because the file format or the file extension is not valid. Verify that the file has not been corrupted and that the file extension
    matches the format of the file.

    Hi,
    Which Excel version are you using? As far as I know, this issue is caused by malware on the affected machine.There are now two known variants of malware which causes this problem: Win32/Crilock.A and
    Win32/Buma!rts. They have both been identified as a new family of ransomware.
    We'd better clean your machine, run Microsoft Safety Scanner (http://www.microsoft.com/security/scanner/en-us/default.aspx).
    For more detail information, please refer to the following link:
    http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2013/09/07/quot-cannot-open-the-file-because-the-file-format-or-extension-is-invalid-quot-opening-office-files.aspx
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • How can I use automator to import a .csv file into a an excel file

    I would still like all the import settings that I get if I am using excel to do the process, i.e. going in with the text format instead of the general format. That way my dates don't change

    You'll need to use Applescript in Automator.
    Note:  File extension cannot be CSV (Excel will assume that the file is comma separated), so add an action to copy or rename with extension TXT.
    (You can rename back at end of Workflow is needed)
    The Applescript Action is:
    on run {input, parameters}
         repeat with f in input
              tell application "Microsoft Excel"
                   open text file filename (f as string) data type delimited field info {{1, text format}} other char "|" with use other
              end tell
          end repeat
          eturn input
    end run
    NOTE: This is formating the 1st col to text
    If you need to format the second, then you need to:
      open text file filename (f as string) data type delimited field info {{1, general format}, {2, text format}} other char "|" with use other
    (You'll need to list the 1st col, 2nd col, etc until you get to the col to format as text).  Formats are (from the Applescript Excel Library):
    [field info list] : A list contain parse information for the individual columns of data.
    Formats are general format, text format, MDY format, DMY format, YMD format, MYD format, DYM format, YDM format, skip column.
    Or you can skip using Automator and just use an Applescript App (this is a droplet, just drop the files on the icon, or click to choose files):
    on run
         set fs to choose file with prompt "Select one or more files to open:" default location alias (the path to desktop folder as text) with multiple selections allowed
         proceed(fs)
    end run
    on open fs
         proceed(fs)
    end open
    on proceed(fs)
         repeat with f in fs
              tell application "Microsoft Excel"
                   open text file filename (f as string) data type delimited field info {{1, text format}} other char "|" with use other
               end tell
          end repeat
    end proceed

  • Open CSV files in Excel through labview

       Dear,
    Am not famillar with *.csv files but I would like to know if it's possible to : open a CSV files in excel through labview.
    I can't used ActiveX for my application. This application is on Labview 8.2
    Regards
      Massif

    Hi Massif,
    a .csv file is a spreadsheet file, so use the "open spreadsheet file" VI.
    Cheers
    Edit:
    Dang, I'm always 30seconds behind you smercurrio!
    Message Edited by lmtis on 04-22-2008 10:27 AM
    Jim
    LV 2013
    Attachments:
    csv.png ‏2 KB

Maybe you are looking for