Issues while opening a UTF16 encoded .csv file in excel using c#

When I tried to open a UTF8 encoded
.csv file in excel through my c# code, doing something like this:
m_excel.Workbooks.OpenText(newPath, Comma: true);
That works fine. Can anyone tell me what to do if I had to open a UTF16 encoded
.CSV file similarly. All options i tried either fails or print incorrect Unicode characters.
So somehow we have to specify the encoding format (of the file to be opened i.e .CSV)  while opening using excel functions, which i am unable to figure out.
Please help me. I am badly stuck here.
Thanks in advance.

Hi Jb9952,
There is an Origin parameter in
Workbooks.OpenText method, you need to specify this parameter. You could try to use xlWindows (Windows ANSI).
To get the specify file origin value, you could get the detail code through Record Macro feature in excel.
Regards
Starain
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.
Click
HERE to participate the survey.

Similar Messages

  • 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.

  • 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

  • Starting AMT FailedI am facing the same issue while opening AMT/Mobile Sale

    Hi All,
    I am facing a issue while opening AMT/Mobile Sales Appl/System Maintenance. I am getting the error saying 'UI_CORE_APPL_LAUNCH_FAILED_STA'. Could anyone out there  please tell me how to resolve this issue?
    I checked the UID and PWD under HKEY_LOCAL_MACHINE\SOFWARE\SAP\MSA\MW\secutiry for IDES DB and they are consistent with the ODBC parameters for IDES.
    Much appreciated,
    Karuna.

    Hi All,
    my issue is resolved. The problem with my issue was the missing entry in the table SMO_AUTH_SYS. I found the note 687679 and ran the report according to it. With that table SMO_AUTH_SYS was populated with the record. Later i was able to connect to AMT and gave the standard role SAP_AMT_USER and since then i am able to log into MSAA application and also MSY application
    My issue is resolved. Thanks for everyone who tried to help me out.
    Thanks,
    Karuna.

  • Issue while opening BI4 webi report instance using CMC on IE8 browser

    Hi,
    Having issue while opening BI4 webi report instance using CMC on IE8 browser.
    Steps to reproduce the error:
    1. Login to CMC
    2.  View Webi History.
    3.  Open successful instance  (For the 1st or 2nd time reports are opening up, from the 3rd time it just freeze the session)
    4. After it get freeze we need to close the IE using Task Manager.
    Can any one please suggest a resolution for this issue.
    Thanks,
    Ganesh.M

    Hello Gokul,
    first thing is to check is if your chrome version is supported by your current BO version as specified in the PAM (is it?). If the chrome version is supported, and you still have an issue, then you can check with a sap support engineer.
    best regards,
    Victor

  • Issue while opening webi reports using OpenDoc url in Chrome browser

    Hi
    We are in SAP BI4.0 SP7. We are facing weird issue while opening the webi report via OpenDoc url in chrome. we are facing the below issue only in chrome and it works perfectly in IE and Firefox.
    For the first time the report gets opened properly(when a session is created). If we try to open the same report from the same machine in a different browser tab, report gets opened up without any Tables\charts. We could see only a blank page with just the Report Tab name at the bottom. If we do refresh on the page, the report opens up correctly. We have checked for packet drops and there is no such thing. Is there any setting that we should make to resolve this. Your help is appreciated.
    thanks
    Gokul

    Hello Gokul,
    first thing is to check is if your chrome version is supported by your current BO version as specified in the PAM (is it?). If the chrome version is supported, and you still have an issue, then you can check with a sap support engineer.
    best regards,
    Victor

  • Performance issue while opening the report

    HI,
    I am working BO XI R3.1.there is performance issue while opening the report in BO Solris Server but  on window server it is compratively fast.
    we have few reports which contains 5 fixed prompt 7 optional prompt.
    out of 5 fixed prompt 3 prompt is static (it contains 3 -4 record only )which is coming from materlied view.
    we have already use many thing for improve performance in report like-
    1) Index Awareness
    2) Aggregate Awareness
    3) Array fatch size-250
    3) Aray bind time -32767
    4) Login time out -600
    the issue is that before refresh opening the report iteslf taking time 1.30 min on BO solris server but same report taking time in BO window server 45 sec. even we  import on others BO solris server it is taking same time as per old solris server(1.30 min).
    when we close the trace in solris server than it is taking 1.15  sec time.it should not be intial phase it is not hitting more on database.so why it is taking that much time while opening the report.
    could you please guide us where exectly problem is there and how we can improve performance for opening the report.In case the problem related to solris server so what would be and how can we rectify.
    Incase any further input require for the same feel free to ask me.

    Hi Kumar,
    If this is happening with all the reports then this issue seems to be due to firewall or security settings of Solaris OS.
    Please try to lower down the security level in solaris and test for the issue.
    Regards,
    Chaitanya Deshpande

  • 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

  • Separator problem after opening a exported CSV file in Excel

    Dear experts,
    After exporting a report to .CSV file from BEX browser, I opened this file with Excel. I found that "," is considered as separator, but not ";" which is by default the separator in CSV file exported.
    For example, when i open the CSV in Notepad, i have:
    "15.07.2008";"E001";"No value"
    "15.07.2008";"E001";"No value, date, time"
    When it is opened in Excel, I have
    "15.07.2008";"E001";"No value"(Column A)
    "15.07.2008";"E001";"No value(Column A) date(Column B)    time"(Column C)
    Is that a problem in Excel configuration? How to solve it (for example, set ; as separator)?
    Thanks in advance!
    Edited by: Xiaoxuan WU on Jan 23, 2008 4:00 PM

    Hi,
    Please try opening your .csv file in excel. I am assuming that all texts are in one column. Select this column, go to Data>Text to Columns. Set the checkbox to Delimited. Click on next. Set the delimeter to ; and the text qualifier to ". Click on next. Click on finish. Then save in another filename. Try opening this new .csv file in notepad and see if it has the format you needed.
    Hope this helps,
    Juice

  • Converting html file to csv file or excel file

    Any body help me to convert html file into csv file or excel file using java.
    I have no idea how to proceed.
    is there any third party API's available.
    Please guide me.
    Thanks in advance
    Vivek

    dev_vivek wrote:
    I have no idea how to proceed.That could be due to the fact that there is no generic way to transform a html file into a csv or excel file.
    Could it be that you're really interested in extracting specific values from the html file and then you want to export these values to csv and/or excel?

  • How to load csv file to table using ssis

    Hi,
    i have loaded the csv file to table using ssis, it is working file but record is mismatch.
    source data :
    col1 col2 col3 col4
    aa, bb, this is sample,data for the details, this is 
    column delimiter - comma
    col3 - record contains comma. so col3 record after the comma is added with the as col4
    i need the col3 record with comma.
    so what is the column delimiter will use ?
    Regards,
    abdul Khadir

    Hi Abdul,
    Based on your description, you want to distinguish a comma is used for column separator or used in address column in a text file, then load the data from the text file to SQL Server table.
    As per my understanding, if you can replace the comma column separator to another delimiter like semicolon (;), just do it. Then we can select Semicolon {;} as Column delimiter for the Flat File Connection Manager. Or ensure all columns are enclosed in double
    quotes ("). Then we can set the double quotes (") as Text qualifier for the Flat File Connection Manager, and the commas will be loaded as part of the string fields.
    If you can't have that done, because computers don't know the context of the data, you would have to come up with some kind of rules that decides when a comma represents a delimiter, and when it is just part of the text. I think a custom script component
    would be necessary to pre-process the data, identify where a comma is part of an address, and then treat that as one field.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • SSO Issues while opening a ppt file document only from Solution Manager

    Hi Experts,
    Version - Solman 3.1
    Issue
    =====
    While trying to open a Powerpoint(ppt) file document, from the service provided by Solution Manager thru a weblink:
    1.A SSO authentication request of the server pops up requesting to authenticate Windows userid/password
    2.After entering the windows password the first time..authentication is requested again..At times on the second chance of authentication, the request is successfull and the powerpoint document opens.. But we have faced issues wherein the issues had persisted for 5-6 chances and only then the ppt document opens.
    3.Point to be noted is that even if the SSO authentication of the windows password is cancelled even the first chance the document opens..
    4.Issue is only with powerpoint document and not with word document..
    Going by point 3.. there is no relevance of the windows authentication to popup since authenticating or not authenticating doesn't matter.
    Issue unknown is why is that whenever only a ppt document from Solman is being opened does the SSO Windows authentication window of Solman server opens.. Is there any settings to be considered..
    Regards,
    Nagendran

    Since I am new to the field requesting the kind quick help by java experts here to help me change the code so that I would be able to search a web apge saved on disk and search and highlight a word in that page ....
    Thanks in advance........
    Looking forward for your kind suggestions......1) Did you write that code? If yes, proceed to 2). If no, I charge 150 euros/hr. Let me know when you want me to start.
    2) Post the code for a program that opens a text file with the following in it:
    hello world
    and prints the contents out using System.out.println().
    3) Modify the program in 2) to determine if the file contains the word "yes". Post the code.
    4) An html file is no different than the text file in 2).

  • Web.Show_document to open .csv file in Excel How??

    We have a utility built in our menu (mmb)
    It reads the screen output and creates a .CSV file on the server using text_io and then using Web.show_document displays the file on the client.
    The file opens in MS-EXCEL. It gives a standard Excel prompt for Open , Save or run.
    Now our application has moved to FMW 11gAS.
    The file creation is happening but the file is opening in HTML format.
    The excel prompt is not coming.
    Where is setting to be done to open the .CSV files in EXCEL

    In addition to what I already mentioned, your issue may be partially caused by these two bugs: 10186820 & 10191154
    Both have been fixed in 11.1.1.6, which was released last week. Information about the 11.1.1.6 patch set can be found in MyOracleSupport note 1364511.1
    The fix should also already be in 11.1.2.0

  • Open .csv file in excel via Labwindows

    Hello
    After writing all my data in a .csv and closing it (using fclose), I would like to open this .csv file using Excel via a Labwindows command so that the user can see all the data. Is that possible? If yes, which function should I use?
    Thanks

    The simplest way of all is to issue the command OpenDocumentInDefaultViewer (): it should automatically open Excel with the document in it. It is equivalent of double-clicking the file in windows explorer.
    If it does not opens the file, you must verify that in windows CSV file extension is correctly associated with Excel application.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Zero is getting truncated while XI is creating a CSV file

    Hi,
    Scenario is IDOC to File.
    in the IDOC i get some Serial number as 00000007856465 in the output CSV file i need this value as 07856465
    Here when i run this map in the ESR Message mapping i could see 07856465 this value fine but while posting at the output directory the values are dropped with zeros truncated.
    in the output CSV file -- the value is -- 7856465
    Could you please help me out in solving this issue.
    Thanks,
    --Sai.

    Hi Sai Krishna,
    As said by Bhaskar, use Formatnum function or UDF in your mapping. So that you would be able to get the 0's in the output.
    I would prefer to go with FormatNum function.
    Check the UDF provided by Raja Shekar in the below thread:
    UDF for leading zero's in message mapping
    Thanks,

Maybe you are looking for