Ask a Question related to PERL Miscellaneous, Design and Development.

  1. #1

    Default excel to csv

    hi all

    anybody knows a script to save an excel in csv?

    i need it for a php script

    tnx


    Josh Guest

  2. Similar Questions and Discussions

    1. PDF to Excel
      I have a financial report in PDF format that has many lists in columns with text and figures. I would like to export this to Excel or another...
    2. Place Excel into table with ability to link when native Excel file is updated.
      Is it possible to place an Excel file into InDesign and create a link so that any changes made later to the Excel file can be updated in InDesign? ...
    3. Excel
      I have MicrosoftXP,whenever I receive Excel 97 attachements I can view only through using an adaptor - is there any way I can not only see the...
    4. [PHP] PHP, Excel, jpgraph - can the graph be included in the Excel output?
      You need a class that can create xls files with images. Or you can create a Web Archive: http://officeupdate.microsoft.com/office/webarchive.htm ...
    5. PHP, Excel, jpgraph - can the graph be included in the Excel output?
      Good morning! I have several reports that are generated using PHP & MySQL for which I would like to include a graph using the excellent jpgraph...
  3. #2

    Default Re: excel to csv

    Josh wrote:
    > hi all
    >
    > anybody knows a script to save an excel in csv?
    >
    > i need it for a php script
    Then why ask in a perl newsgroup? If you want a PHP answer, try a PHP
    newsgroup.


    J. Gleixner Guest

  4. #3

    Default Re: excel to csv

    "J. Gleixner" <glex_nospam@qwest.net> ha scritto nel messaggio
    news:mH60b.17$LC5.11341@news.uswest.net...
    > Josh wrote:
    > > hi all
    > >
    > > anybody knows a script to save an excel in csv?
    > >
    > > i need it for a php script
    > Then why ask in a perl newsgroup? If you want a PHP answer, try a PHP
    > newsgroup.
    i need a perl script to save an excel in csv


    Josh Guest

  5. #4

    Default Re: excel to csv

    On Mon, 18 Aug 2003 15:55:43 +0200
    "Josh" <josh@nospam.pixael.com> wrote:
    > anybody knows a script to save an excel in csv?
    >
    > i need it for a php script
    If you need this for a PHP script, then wht not post to a PHP group?
    Why are you mixing languages? This is an annoying pet peeve I have.

    My suggestion is pick one and stick with it's functionality. I
    believe this has been done successfully in both languages - pick one.

    If you still have a burning desire or some company restriction that
    requires you to write in Perl for this task, have a look at the
    Spreadsheet::WriteExcel module. This should do what you're asking to
    do.

    HTH

    Jim
    James Willmore Guest

  6. #5

    Default Re: excel to csv

    On Mon, 18 Aug 2003 15:55:43 +0200
    "Josh" <josh@nospam.pixael.com> wrote:
    > anybody knows a script to save an excel in csv?
    >
    > i need it for a php script
    If you need this for a PHP script, then wht not post to a PHP group?
    Why are you mixing languages? This is an annoying pet peeve I have.

    My suggestion is pick one and stick with it's functionality. I
    believe this has been done successfully in both languages - pick one.

    If you still have a burning desire or some company restriction that
    requires you to write in Perl for this task, have a look at the
    Spreadsheet::WriteExcel module. This should do what you're asking to
    do.

    HTH

    Jim


    James Willmore Guest

  7. #6

    Default Re: excel to csv

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    "Josh" <josh@nospam.pixael.com> wrote in news:bhr2b9$275ib$1@ID-
    203386.news.uni-berlin.de:
    > "J. Gleixner" <glex_nospam@qwest.net> ha scritto nel messaggio
    > news:mH60b.17$LC5.11341@news.uswest.net...
    >> Josh wrote:
    >> > hi all
    >> >
    >> > anybody knows a script to save an excel in csv?
    >> >
    >> > i need it for a php script
    >> Then why ask in a perl newsgroup? If you want a PHP answer, try a PHP
    >> newsgroup.
    >
    > i need a perl script to save an excel in csv
    >
    >
    Perhaps Visual Basic, or VBA, would be a better tool for doing this? Why
    do you have your heart set on Perl?

    - --
    Eric
    $_ = reverse sort $ /. r , qw p ekca lre uJ reh
    ts p , map $ _. $ " , qw e p h tona e and print

    -----BEGIN PGP SIGNATURE-----
    Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

    iQA/AwUBP0E9LmPeouIeTNHoEQKqRgCfanTcjHrwN0Slmef16m63YN 5TL/8An2II
    jIJqdJCdyjJwzHp57FzMjcnq
    =nRhz
    -----END PGP SIGNATURE-----
    Eric J. Roode Guest

  8. #7

    Default Re: excel to csv


    "James Willmore" <jwillmore@cyberia.com> wrote in message
    news:20030818155210.749a5661.jwillmore@cyberia.com ...
    >
    > My suggestion is pick one and stick with it's functionality. I
    > believe this has been done successfully in both languages - pick one.
    >
    > If you still have a burning desire or some company restriction that
    > requires you to write in Perl for this task, have a look at the
    > Spreadsheet::WriteExcel module. This should do what you're asking to
    > do.
    >
    You're going in the wrong direction. The OP wants excel -> csv not csv ->
    excel. The Spreadsheet::WriteExcel module won't help for the latter.
    Assuming you're on a Windows machine and you have Excel installed, you might
    be able to use the Win32::OLE module to open the file in Excel and then use
    Excel itself to save the file to csv (from a simple macro:
    ActiveWorkbook.SaveAs FileName:="C:\test.csv", FileFormat:=xlCSV).

    Matt


    Matt


    Matt Garrish Guest

  9. #8

    Default Re: excel to csv

    "Josh" <josh@nospam.pixael.com> wrote:
    > hi all
    >
    > anybody knows a script to save an excel in csv?
    perldoc Spreadsheet::ParseExcel
    gives a script on the first page that should be readily adaptable
    to your need.
    >
    > i need it for a php script
    What difference does it make what script you need it for?

    Xho

    --
    -------------------- [url]http://NewsReader.Com/[/url] --------------------
    Usenet Newsgroup Service New Rate! $9.95/Month 50GB
    ctcgag@hotmail.com Guest

  10. #9

    Default Re: excel to csv

    "Matt Garrish" <matthew.garrish@sympatico.ca> wrote in message news:<Sze0b.478$HB4.84432@news20.bellglobal.com>.. .
    > "James Willmore" <jwillmore@cyberia.com> wrote in message
    > news:20030818155210.749a5661.jwillmore@cyberia.com ...
    > >
    > > My suggestion is pick one and stick with it's functionality. I
    > > believe this has been done successfully in both languages - pick one.
    > >
    > > If you still have a burning desire or some company restriction that
    > > requires you to write in Perl for this task, have a look at the
    > > Spreadsheet::WriteExcel module. This should do what you're asking to
    > > do.
    > >
    >
    > You're going in the wrong direction. The OP wants excel -> csv not csv ->
    > excel. The Spreadsheet::WriteExcel module won't help for the latter.
    > Assuming you're on a Windows machine and you have Excel installed, you might
    > be able to use the Win32::OLE module to open the file in Excel and then use
    > Excel itself to save the file to csv (from a simple macro:
    > ActiveWorkbook.SaveAs FileName:="C:\test.csv", FileFormat:=xlCSV).
    Spreadsheet::ParseExcel is what I meant :(
    I agree that, if on a WIN32 platform, Win32::OLE is more the way to go.
    I just wanted to suggest a portable option.
    Both should work fine.

    Half asleep.

    Jim
    James Willmore Guest

  11. #10

    Default Re: excel to csv

    "Eric J. Roode" <REMOVEsdnCAPS@comcast.net> ha scritto nel messaggio
    news:Xns93DBAC1EB2F10sdn.comcast@206.127.4.25...
    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > "Josh" <josh@nospam.pixael.com> wrote in news:bhr2b9$275ib$1@ID-
    > 203386.news.uni-berlin.de:
    >
    >
    > Perhaps Visual Basic, or VBA, would be a better tool for doing this? Why
    > do you have your heart set on Perl?
    because this is like php


    Josh Guest

  12. #11

    Default Re: excel to csv

    "Matt Garrish" <matthew.garrish@sympatico.ca> ha scritto nel messaggio
    news:Sze0b.478$HB4.84432@news20.bellglobal.com...
    >
    > "James Willmore" <jwillmore@cyberia.com> wrote in message
    > news:20030818155210.749a5661.jwillmore@cyberia.com ...
    > >
    > > My suggestion is pick one and stick with it's functionality. I
    > > believe this has been done successfully in both languages - pick one.
    > >
    > > If you still have a burning desire or some company restriction that
    > > requires you to write in Perl for this task, have a look at the
    > > Spreadsheet::WriteExcel module. This should do what you're asking to
    > > do.
    > >
    >
    > You're going in the wrong direction. The OP wants excel -> csv not csv ->
    > excel. The Spreadsheet::WriteExcel module won't help for the latter.
    > Assuming you're on a Windows machine and you have Excel installed, you
    might
    > be able to use the Win32::OLE module to open the file in Excel and then
    use
    > Excel itself to save the file to csv (from a simple macro:
    > ActiveWorkbook.SaveAs FileName:="C:\test.csv", FileFormat:=xlCSV).
    i'm sorry... i'm working on a linux server


    Josh Guest

  13. #12

    Default Re: excel to csv

    <ctcgag@hotmail.com> ha scritto nel messaggio
    news:20030818220430.333$2N@newsreader.com...
    > "Josh" <josh@nospam.pixael.com> wrote:
    > > hi all
    > >
    > > anybody knows a script to save an excel in csv?
    >
    > perldoc Spreadsheet::ParseExcel
    > gives a script on the first page that should be readily adaptable
    > to your need.
    very good this is ok ;)
    > >
    > > i need it for a php script
    >
    > What difference does it make what script you need it for?
    in my php script i download the zipped excel from a server...
    then i extract the excel and save it on the server... now i can't read the
    excel... i need some tool that convert excel in csv


    Josh Guest

  14. #13

    Default Re: excel to csv

    Josh wrote:
    > "Matt Garrish" <matthew.garrish@sympatico.ca> ha scritto nel messaggio
    > news:Sze0b.478$HB4.84432@news20.bellglobal.com...
    >
    >>"James Willmore" <jwillmore@cyberia.com> wrote in message
    >>news:20030818155210.749a5661.jwillmore@cyberia.c om...
    >>
    >>>My suggestion is pick one and stick with it's functionality. I
    >>>believe this has been done successfully in both languages - pick one.
    >>>
    >>>If you still have a burning desire or some company restriction that
    >>>requires you to write in Perl for this task, have a look at the
    >>>Spreadsheet::WriteExcel module. This should do what you're asking to
    >>>do.
    >>>
    >>
    >>You're going in the wrong direction. The OP wants excel -> csv not csv ->
    >>excel. The Spreadsheet::WriteExcel module won't help for the latter.
    >>Assuming you're on a Windows machine and you have Excel installed, you
    >
    > might
    >
    >>be able to use the Win32::OLE module to open the file in Excel and then
    >
    > use
    >
    >>Excel itself to save the file to csv (from a simple macro:
    >>ActiveWorkbook.SaveAs FileName:="C:\test.csv", FileFormat:=xlCSV).
    >
    >
    > i'm sorry... i'm working on a linux server
    >
    >
    Staroffice perhaps?

    Peter Hickman Guest

  15. #14

    Default Re: excel to csv

    Josh wrote:
    > hi all
    >
    > anybody knows a script to save an excel in csv?
    >
    > i need it for a php script
    >
    > tnx
    Josh,

    *PLEASE* try reading the posting guidelines. It would have suggested (among
    other things) doing a search on something like Google Groups ... if you
    had, you'd have found the following thread:

    [url]http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=Xns93B49CBD9408Easu1cornelledu%40132.236 .56.8&rnum=5&prev=/groups%3Fq%3Dexcel%2Bcsv%2Bgroup:comp.lang.perl.mi sc%26hl%3Den%26lr%3D%26ie%3DUTF-8%26as_drrb%3Db%26as_mind%3D12%26as_minm%3D5%26as_ miny%3D2003%26as_maxd%3D19%26as_maxm%3D8%26as_maxy %3D2003%26selm%3DXns93B49CBD9408Easu1cornelledu%25 40132.236.56.8%26rnum%3D5[/url]

    where I provided a sample script to do just this for Sara.

    Regards,

    Garry


    Garry Short Guest

  16. #15

    Default Re: excel to csv

    "Garry Short" <g4rry.sh0rt@zw4llet.com> ha scritto nel messaggio
    news:3f41f025$0$46005$65c69314@mercury.nildram.net ...
    > Josh wrote:
    >
    > > hi all
    > >
    > > anybody knows a script to save an excel in csv?
    > >
    > > i need it for a php script
    > >
    > > tnx
    >
    > Josh,
    >
    > *PLEASE* try reading the posting guidelines. It would have suggested
    (among
    > other things) doing a search on something like Google Groups ... if you
    > had, you'd have found the following thread:
    >
    >
    [url]http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=Xns93B49CBD9408Easu1cornelledu%40132.236 .56.8&rnum=5&prev=/groups%3Fq%3Dexcel%2Bcsv%2Bgroup:comp.lang.perl.mi sc%26hl%3Den%26lr%3D%26ie%3DUTF-8%26as_drrb%3Db%26as_mind%3D12%26as_minm%3D5%26as_ miny%3D2003%26as_maxd%3D19%26as_maxm%3D8%26as_maxy %3D2003%26selm%3DXns93B49CBD9408Easu1cornelledu%25 40132.236.56.8%26rnum%3D5[/url]
    >
    > where I provided a sample script to do just this for Sara.
    tnx but unfortunately i'm working on a linux server...


    Josh Guest

  17. #16

    Default Re: excel to csv

    "Eric J. Roode" <REMOVEsdnCAPS@comcast.net> ha scritto nel messaggio
    news:Xns93DC3FCC1FEB1sdn.comcast@206.127.4.25...
    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > "Josh" <josh@nospam.pixael.com> wrote in
    > news:bhsoj9$2pg60$1@ID-203386.news.uni-berlin.de:
    >
    > > in my php script i download the zipped excel from a server...
    > > then i extract the excel and save it on the server... now i can't read
    > > the excel... i need some tool that convert excel in csv
    >
    > Why don't you explain what you're trying to do, in some detail, right from
    > the start, rather than doling out hints one at a time? Several people
    have
    > already posted useful suggestions, and to each one, you give a
    one-sentence
    > response along the lines of "That won't work, because x."
    >
    > Explain your complete problem. Now. Or you're not going to get much more
    > help from anyone.
    ok... i need to parse an excel file that i downloaded automatically from a
    remote server
    i'm working on a linux server so i can't use some php's objects that run
    only on windows systems
    i can't use an odbc connection because my server don't support this
    so i would convert this excel in a csv file to parse it with php... i can do
    this calling a perl script (that convert a xls in csv) by my php script and
    then parse the csv with php...


    Josh Guest

  18. #17

    Default Re: excel to csv

    Josh wrote:

    <SNIP>
    >> *PLEASE* try reading the posting guidelines. It would have suggested
    > (among
    >> other things) doing a search on something like Google Groups ... if you
    >> had, you'd have found the following thread:
    >>
    >>
    >
    [url]http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=Xns93B49CBD9408Easu1cornelledu%40132.236 .56.8&rnum=5&prev=/groups%3Fq%3Dexcel%2Bcsv%2Bgroup:comp.lang.perl.mi sc%26hl%3Den%26lr%3D%26ie%3DUTF-8%26as_drrb%3Db%26as_mind%3D12%26as_minm%3D5%26as_ miny%3D2003%26as_maxd%3D19%26as_maxm%3D8%26as_maxy %3D2003%26selm%3DXns93B49CBD9408Easu1cornelledu%25 40132.236.56.8%26rnum%3D5[/url]
    >>
    >> where I provided a sample script to do just this for Sara.
    >
    > tnx but unfortunately i'm working on a linux server...
    So what? So am I.

    This script was written on my laptop, which runs SuSE 8.1. One of the main
    ideas behind Perl is that it's supposed to be *PORTABLE!*

    In fact, I just went back and read the link I posted - it specifically says
    I'm running Linux, and the OP specifically said in response that she was
    running RedHat 8.

    If you're going to ask for help, how about at least reading the information
    you're pointed at?

    Regards,

    Garry


    Garry Short Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139