Distinguishing between CSV and Excel file formats

I am trying to distinguish between CSV and Excel files.   Most of the files I need to process are CSV, but some have been opened and re-saved in Excel format.  I know about the Excel toolbox available, but haven't used it yet. 
I need to be able to open a spreadsheet file regardless of if it is in CSV or Excel format.  Any help would be greatly appreciated.
Here are two example files, one CSV and one Excel.  Both have .XLS file extensions. 
Attachments:
20-4-XLS.xls ‏21 KB
20-5-CSV.xls ‏8 KB

Hi Paul,
I think the matter is not the extention (xls or csv or whatever) but the format of the data written in your file.
To see what I mean, open the xls file you posted with notepad... What does it look like ?
You have tobe sure of the format of the file you want to read so that you can develop an appropriate VI... if you want to be able to read different type of data format, do a test before reading the file and then use an appropriate routine for each format.
Hope this helps you...
BTW, to read the one named CSV, a simple "read from spreadsheet file" VI will do the job
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

Similar Messages

  • Macro to compare CSV and Excel file

    Team,
    Do we have any macro to compare CSV and Excel file.
    1) In Excel we should have two text boxes asking the user to select the files from the path where they have Stored
    2) First Text is for CSV file
    3) Second Text box is for Excel file
    4) We Should have Compare button that should run the Macro and Show the Differences.
    Thanks!
    Kiran

    Hi
    Based on my understanding, we need to convert the 2 files into the same format before comparing two different formats files. 
    Here are the options:
    1. Convert the CSV file and Excel file into 2-dim Arrays, then compare them, about how to load a CSV file into VBA array, you can search it from
    internet or ask a solution in VBA forum.
    VBA forum:
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=isvvba
    2. Also you can import CSV file to Excel sheet, and then compare them.
    Here is the sample code for your reference:
    ‘import csv file
    Sub InputCSV()
    Dim Wb As Workbook
    Dim Arr
    Set Wb = GetObject(Application.GetOpenFilename("csv file,*.csv", , "please choose a csv file", , False))
    Arr = Wb.ActiveSheet.Range("A1").CurrentRegion
    Wb.Close False
    Range("A1").Resize(UBound(Arr), UBound(Arr, 2)) = Arr
    End Sub
    ‘compare sheet
    Sub CompareTable()
    Dim tem, tem1 As String
    Dim text1, text2 As String
    Dim i As Integer, hang1 As Long, hang2 As Long, lie As Long, maxhang As Long, maxlie As Long
     Sheets("Sheet1").Select
    Columns("A:A").Select
    With Selection.Interior
    .Pattern = xlNone
    .TintAndShade = 0
    .PatternTintAndShade = 0
    End With
    Range("A1").Select
    Sheets("Sheet2").Select
    Rows("1:4").Select
    With Selection.Interior
    .Pattern = xlNone
    .TintAndShade = 0
    .PatternTintAndShade = 0
    End With
    Range("A1").Select
    MaxRow = 250
    MaxColumn = 40
    For hang1 = 2 To maxhang
    Dim a As Integer
    a = 0
    tem = Sheets(1).Cells(hang1, 1)
    For hang2 = 1 To maxhang
    tem1 = Sheets(2).Cells(hang2, 1)
    If tem1 = tem Then
    a = 1
    Sheets(2).Cells(hang2, 1).Interior.ColorIndex = 6
    For lie = 1 To maxlie
    text1 = Sheets(1).Cells(hang1, lie)
    text2 = Sheets(2).Cells(hang2, lie)
    If text1 <> text2 Then
            Sheets(2).Cells(hang2, lie).Interior.ColorIndex = 8
    End If
    Next
    End If
    Next
    If a = 0 Then
    Sheets(1).Cells(hang1, 1).Interior.ColorIndex = 5
    End If
    Next
    Hope this will help.
    Best Regards
    Lan
    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.

  • Exporting pdfs to word and excel file formats  and translating

    Hello, I am new to this forum and came here because I am a professional translator. Although we should be given documents in their original file format, in the real world translators have to convert pdfs such as manuals or annual reports into word or excel files. Given the fact we often work for agencies, and/or do not work directly with the people who created the original files inthe first place, with the best will in the world we normally have to make do with converting the pdf file, or lose the job.
    I would like advice on the best way to learn more about  pdf to word and excel conversion and ways of keeping formatting when it is helpful and removing what is not.
    The general problem is (well the problem is really ignorance on my part!) of course getting the "look and feel" similar in the converted document and knowing more about manipulating the formating and elements which get converted.
    Any help or pointers to online tutorials whether multimedia or text much appreciated.
    David Hardisty (david1610)

    Thank you Lori, this is so clear! I am a teacher as well and there are clear presentations and wonderfully clear presentations and this is in the latter category.
    A tiny suggestion. You would not believe how many pdf files exported to word I have received that are Portuguese content and the sender has not set the language to Portuguese! So in your text entry you might want to mention the language setting. I know it is obvious, but as we know sometimes we cannot see the obvious!
    I will need to look far more carefully at the final things in your video.
    Are there any special considerations for exporting pdf files as Excel? My original doubt was I had to translate some accounting documents. 95% of the document was numbers which did not changing (except for commas to periods and vice versa due to different separator conventions). I did not now how to just select e.g. the vertical column with text. I will go back and try with this suggestion because in this case the look and feel of the numbers was important and the precise fonts etc. seemed to cause problems. But now I am getting out of my depth!
    Thank you again!
    DavidHardisty

  • Selection Screen Excel File Format

    Hi,
    I developed a BDC report to upload data. Data is uploaded Perfactly.
    parametrs: p_file TYPE rlgrap-filename.
    and Excel file format is Storage Location Matnr Stock_Qty
                                         1000    Mat_00001    50
    but i want to give eaxel file screen shot with sample data
    is it possible to give excel format screen shot on selection screen
    before   parametrs: p_file TYPE rlgrap-filename.

    Hi,
    I was telling if  its only  to tell user we can print like comment at the end .I have pasted the code for you .
    it will look at at the bottom of your screen.
    After you declare your slection screen parameters then paste the  code and first text you create text element which has- MS EXCEL format types
    Second textelemnt-Give column1 - "so and so ......
    was i clear this time...
    It not poss to give scrreen shot thriugh above way but throuh your text elemnt message you convery what is colum 1,2 .... to user
    Thank You
    Poornima
    Edited by: Pendyala_poornima on Oct 7, 2011 3:01 PM
    Edited by: Pendyala_poornima on Oct 7, 2011 3:01 PM
    Edited by: Pendyala_poornima on Oct 7, 2011 3:03 PM

  • Output report data to excel file format or csv format

    Is there any way to save softcopy of report output to excel file format or csv format.

    Hi,
    Regarding csv file format, i have no issues. The file is generating without any issues in using oracle reports without using any PL/SQL code.
    My requirement is to design oracle reports to generate excel (.xls) file with multiple worksheets. Each sheets are having many data and graphs(chart).
    Using oracle reports alone, how to achieve this.
    In oracle reports 10g 1.2.0 version, I tried by creating .rdf file but, it is generating single worksheet only.
    In oracle reports 10g 1.2.0 ver, I tried by creating .jsp file. For this first i am creating excel template about how my ouput column headings all that going to be with one sample hard coded data and save the excel file as web page.
    Eg employee.html.
    Next open the html file in oracle reports builder and double click the websource now, you will see the jsp tags, html and xml tags. Now include the contentType="application/vnd.ms-excel " and charset also.
    Next, include the <rw:foreach id="G_EMPNO_1" src="G_EMPNO">
    here insert the fieldl for each column by removing the hard coded values.
    close the tag
    </rw:foreach>
    Save the file as .jsp and deploy it in oc4 enabled folder (say, devsuite_home/reports/j2ee/reports_ids/web
    Start the oc4J server
    Run it in the browser http://server:port/reports/emp.jsp?useride=uid/pwd@db
    It is invoking the Microsoft excel with 3 sheets default and my emp table output in the first page.
    We can save this output file as .xls file by clicking file -> save as.
    1) The question is, it is working fine with Microsoft excel 97-2003 version. But for excel 2007, i am not able to create single html file like how 2003 save web page option.
    2) I found this in oracle getting started demo
    http://www.oracle.com/technology/products/reports/htdocs/getstart/demonstrations/index.html
    Which is more useful. This is what i am looking for.
    I done that in excel 2003 as per demo. But excel 2007 with reports 10g issues.
    Is there any demo for 10g with excel 2007
    3) For most of excel issues working fine with excel 2003 and 10g. But excel 2007 with 10g reports are issues.
    I want the excel output from oracle reports with multiple worksheet similar to the above demo.
    Thank you.

  • Difference between AAC and m4a files, converting from AAC to useable format

    Does anyone know the difference between AAC and m4a files? iTunes has an option to use an AAC encoder to compress CD files, but this creates an m4a file not an AAC file. I just got some actual AAC files and iTunes cannot read these, is there a way to convert from AAC to a format that iTunes recognizes? Thanks

    iTunes uses AAC data wrapped in an MPEG 4 container file. If you got some *.AAC files, and they're just raw AAC files, then you need to wrap them in an MPEG 4 container. The only way I know to do this is using the foobar 2000 program. You can find more information at http://www.hydrogenaudio.org and http://www.foobar2000.org

  • Excel 2007 and Excel 2003 format

    Hi all,
    we have some problems with Excel file format on BPC 7.5NW SP06:
    1- We save input schedules or reports woth Excel 2007 file format. Then when we try to open these report they are corrupted (we click on "Open" and nothing happens). We can download the report from UJFS. The xltx file is corrupted. We can change th file extension to xls. Then we can open the report again.
    2- Is it possible to define the default extension when we save input schedules and reports? By default xltx is selected. We want to have xlt selected by default.
    thanks for your help,
    Romuald

    Hello,
    First you can try checking if you have configured your apset to work with xltx.
    1. Open BPC web admin and select AppSet Parameters
    2. Check ALLOW_EXTENSIONS and DEFAULT_EXTENSIONS if you have xltx there
    3. If not, add and click on update
    If this continues to happen, check note  "1579344 - Office 2007 extensions not loading in BPC 7.5 SP6 for NW". This can be a program error, but note that it only happens for some templates.
    Hope it helps
    Debora

  • How to download alv grid output(with field catalog) into excel file format

    Hi all,
    How to download alv grid output(with field catalogs) into excel file format and same file has to download to application server.
    Please help.
    Regards,
    Satya.

    Hi,
    On list where alv is displayed, select export icon( green color -> ),select spread sheet.
    This will display records in Excel sheet.

  • Conversion of internal table into excel file format &put it on app server

    Hi,
    My requirement is to convert the internal table into excel file format and I have to store it on application server so that administrator can send the file thr e-mail attachment.
    So, please let me know how to convert the records of internal table and store it on application server in Excel file format.
    TIA,
    Nitin

    Hi,
      Use FM GUI_DOWNLOAD to download the data from inernal table to excel sheet.
    Then Using tcode CG3Z u can transfer file to application server.
    *&      Form  sub_download
          text
    -->  p1        text
    <--  p2        text
    FORM sub_download.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
        BIN_FILESIZE                    =
          filename                        = p_path
         filetype                        = 'ASC'
        APPEND                          = ' '
         write_field_separator           = 'X'
        HEADER                          = '00'
        TRUNC_TRAILING_BLANKS           = ' '
        WRITE_LF                        = 'X'
        COL_SELECT                      = ' '
        COL_SELECT_MASK                 = ' '
        DAT_MODE                        = ' '
        CONFIRM_OVERWRITE               = ' '
        NO_AUTH_CHECK                   = ' '
        CODEPAGE                        = ' '
        IGNORE_CERR                     = ABAP_TRUE
        REPLACEMENT                     = '#'
        WRITE_BOM                       = ' '
        TRUNC_TRAILING_BLANKS_EOL       = 'X'
        WK1_N_FORMAT                    = ' '
        WK1_N_SIZE                      = ' '
        WK1_T_FORMAT                    = ' '
        WK1_T_SIZE                      = ' '
      IMPORTING
        FILELENGTH                      =
        TABLES
          data_tab                        = it_final
        FIELDNAMES                      =
      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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " sub_download
    Otherwise use OPEN DATASET and TRANSFER statement to download data from internal table to direct application server
    Regards,
    Prashant

  • Tranfer table content in to excel file format

    HI
    I have Created one table .and I want to download this table in to excel file format.how can i do this.

    Hi Vijay
    1) Type the t-code SE16
    2) Type the table name, for example USR02
    3) Press F7 to view the table contents
    4) If you need filter the data in the next screen you could do it.
    5) Press F8 or press the execute bottom.
    In the next screen you will find the result.
    In the menu, follow the options:
    System->List->Save->Local File->Spreadsheet
    Type the excel name, and click generate
    Hope it helps, and please reward points if helpful
    Regards

  • Best way to transfer csv or excel file ??

    Hi
    Can anyone recommend the best way for a customer emailing a csv or excel file to me - how can i guarantee it came from them and hasn't been tampered with. This file is generated from the application i develped if this helps.
    Have looked at public private keys and signatures etc,
    Thx
    Stephen

    1. your customer should have generated a key pair (public/private).
    2. you should have a copy of his public key.
    3. the customer creates a hash (using MD5 for example) from the file he wants to send.
    4. the customer encrypts the resulting hash with his secret key (this is a signature).
    5. the customer sends the file and the encrypted hash.
    After you receive both files:
    1. you create a hash from the excel file received (using the same algorithm the customer used to create the hash).
    2. you decrypt the encrypted hash the customer sent.
    3. you compare both hashes, if both are the same, then the excel file you received is Ok = has not been tampered.
    Hope this helps.

  • Save as PDF, HTML and CHM file formats

    Is FrameMaker capable of saving in all three of these formats: PDF, HTML and CHM file formats? Would InDesign be a better choice?

    The first two, yes. For Compiled Help, the third, I'm sure you know that the files have to be compiled, so no, and I don't think the source files for compilation are a direct export either, unless you can follow an XML path. Although the popularity of CHM is way down from a number of years ago because HTML is more portable, but that's a different issue.
    If I were you, I'd look at MIF2go, a Frame add on that does support export to all these formats, and a number of others.
    InDesign doesn't do this either...
    Just as a word of unasked for advice, choosing your authoring platform by what it can output is a back-asswords way to choose a tool. Find the tool that suits the way you create documents the best so you get more required features to create your stuff quicker and easier.
    Both the tools you mention and most other modern ones do pretty open-ended output, either directly or through filters or conversion utilities... there are always ways to massage output to a different format. So output is certainly a consideration, but it's a relatively minor one.
    As for input tools, you're comparing apples and oranges with FM and ID. FM excels at book style documents with multiple chapters or files that share common layout characteristics. InDesign excels at shorter documents that are usually design-driven, that require hands-on layout tweaking, and it can't do multiple file management.
    Cheers,
    Art

  • Distinguish between AW5 and 6 in script

    I'm trying to create an application in Automator to automate the conversion of AW to iWork. I'm using one of Yvan's scripts to convert AW6 to iWork successfully. The only step remaining is to convert to AW6 from 5, something that shouldn't be too hard since all it has to do is open and save. However, I can't find a good way to distinguish between AW5 and 6. In his script, I believe Yvan does this here:
    on AWtoAW6(leCheminOriginal_UniText) -- leCheminOriginal_UniText est Unicode text
              local leFichier, flag, nf, l, nouveauChemin
              set leFichier to leCheminOriginal_UniText as alias
              try
                        tell application "AppleWorks 6.2.9"
      activate
      open leFichier
                                  set nf to name of document 1
                                  if nf contains v6 then
                                            set AppleScript's text item delimiters to v6
                                            set l to text items of nf
                                            set AppleScript's text item delimiters to ""
                                            set nf to l as text
                                  end if
                                  if nf does not end with ".cwk" then set nf to nf & ".cwk"
                                  set nouveauChemin to cheminDeStockage & nf
                                  tell application "System Events"
                                            if exists (file nouveauChemin) then set name of file nouveauChemin to (text 1 thru -(2 + (length of "cwk")) of nf) & my horoDateur(modification date of file nouveauChemin) & ".cwk" (* name stamped *)
      make new file at end of folder cheminDeStockage with properties {name:nf, file creator:"BOBO", file type:fileType}
                                  end tell
                                  set leFichier to nouveauChemin as alias
      save document 1 in leFichier
      close document 1
                        end tell -- AppleWorks 6
              on error
                        set rapport to rapport & msg96 & nouveauChemin & return
              end try
    end AWtoAW6
    But I'm not sure. What I need is a script that opens, checks if it's an AW5 file, if it is opens and saves in AW6, and then proceeds to open my other script that can do the

    I'm not sure what you mean. The files have to be saved as AW6 for the iWork apps to be able to open them.
    Yvan has added all of his AppleWorks scripts to his Box.com account. He says the one you need is https://app.box.com/s/hqq9jwfi45nknjpf6d52

  • Best way to view and edit OpenOffice files on my new iPad Mini (originally Word and Excel files). Thanks!

    Can someone tell me the best way to view and edit OpenOffice files on my new iPad Mini (originally Word and Excel files)? Thanks!

    wmf files is a MS Windows video file, you will need a tool to covert the wmf files to another file format OS X will read. Simply Google to find a converter you are interested in and use it.

  • Diff between logical and physical file path

    Hi ,
    Could you please explain difference between logical and physical file path's and their importance in ABAP.
    Thanks and regards,
    shyla

    Hi
    The function module FILE_GET_NAME convert a logical path into its corresponding physical path.
    The advantage of using logical pathes within your applications is obivous:
    If you need to change the physical path you just adjust it within transaction FILE yet no changes are required to your application.
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/25/ab3a57df3b11d189fc0000e829fbbd/frameset.htm
    The file names that you use in ABAP statements for processing files are physical names. This means that they must be syntactically correct filenames for the operating system under which your R/3 System is running. Once you have created a file from an ABAP program with a particular name and path, you can find the same file using the same name and path at operating system level.
    Since the naming conventions for files and paths differ from operating system to operating system, ABAP programs are only portable from one operating system to another if you use the tools described below.
    To make programs portable, the R/3 System has a concept of logical filenames and paths. These are linked to physical files and paths. The links are created in special tables, which you can maintain according to your own requirements. In an ABAP program, you can then use the function module FILE_GET_NAME to generate a physical filename from a logical one.
    Maintaining platform-independent filenames is part of Customizing. For a full description, choose Tools ® Business Engineer ® Customizing, followed by
    Implement. projects ® SAP Reference IMG. On the next screen, choose Basis Components System Administration ® Platform-independent File Names.
    For a more detailed description of the function module FILE_GET_NAME, enter its name on the initial screen of the Function Builder and choose Goto Documentation. On the next screen, choose Function module doc.
    Another way of maintaining platform-independent filenames is to use the Transaction FILE. The following sections provide an overview of the transaction.
    To create a logical filename, choose Logical filename definition, client-independent from the Navigation group box in Transaction FILE, then choose New entries. You define logical filenames
    You can either define a logical filename and link it to a logical path (as displayed here), or you can enter the full physical filename in the Physical file field. In the latter case, the logical filename is only valid for one operating system. The rules for entering the complete physical filename are the same as for the definition of the physical path for the logical file. To display further information and a list of reserved words, choose Help.
    If you link a logical path to a logical file, the logical file is valid for all syntax groups that have been maintained for that logical path. The filename specified under Physical file replaces the reserved word  in the physical paths that are assigned to the logical path. To make the name independent of the operating system, use names that begin with a letter, contain up to 8 letters, and do not contain special characters.
    Save your changes.

Maybe you are looking for

  • Adobe form output not getting displayed for the whole length of the page

    Hi All, I have developed an adobe form using webdynpro application. While testing, the output(pdf) does not occupy the entire page/screen from end-user side. But when I test the same from my side, the output appears fine . Could anyone suggest me on

  • Weird scratches in lcd panel (23" acd)

    Well, i'm back. This 23" is the third one I got from Apple, the two previouso one's exhibited ghosting & the pink issue. This one doesn't have these, only some backlight leaking when viewing black images fullscreen. The thing is, the build quality on

  • Aiff files show as 'Unix Executable' What are they? I want Aiffs!

    Hi, I wonder if you can help me? I'm trying to transfer Aiff files from my old OS9 Mac to my brand new shiny imac. I've had partial success but the majority appear as 'Unix Executable files' ... and they don't load up. Is there a trick I'm missing? T

  • Astrology Calendar Creative Freedom with blank Calendar Page

    I would like to supply my own Calendar Page Pictures as well as the Calendar Calculations using my own Astrology Program to Calculate a differnt Calendar for every time zone. This suggestion has got to be the next step for your Calendars! Able to pri

  • My SSD wont boot up

    I bought a Samsung SSD 850 EVO and make a copy from my MacBook Pro 13 MID 2012 Yosemite 10.10.2 With OSX using Carbon Copy Cloner. Then I boot up my SSD from the Enclosure and works fine.But when i Replaced With my HD ssd wont boot up and question ma