Print to CSV



  • I know there are several programs that will install a virtual printer (CutePDF for example) to print directly to a virtual printer and have the output be .pdf.

    Any such thing as a virtual printer that would print to a .csv file?



  • No, CSV is a text format, not a graphical format. Conceptually printing to CSV wouldn't mean anything. "Print to" is an image process, it literally takes a "picture" of the data and the printer device turns that into a file or literally puts it on paper.

    CSV is a formatted text format, it isn't an image of any sort. So to send text into a CSV you have to already have meta-tagged text in some format that the system can structure.

    So "print to" is an image format.
    CSV is structured data format.

    Conceptually printing to CSV doesn't mean anything short of a CSV with a single text field containing the binary lob (blob) of the image.



  • csv are text files that will look something like this:

    Year,Make,Model,Description,Price
    1997,"Ford","E350","ac, abs, moon",3000.00
    1999,"Chevy","Extended Edition","",4900.00
    1999,"Chevy","Venture Extended Edition, Very Large","",5000.00
    1996,"Jeep","Grand Cherokee","MUST SELL! air, moon roof, loaded",4799.00
    


  • From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.



  • @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Depends on what "integration" is.



  • @Pete-S said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Depends on what "integration" is.

    It might spit everything out in a single cell or split every word or something. There's almost no chance it will split the file as desired



  • @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Best bet would be to take a look at what the Excel output looks like and see how you can make LibreOffice create the same.... unless it's doing something really stupid and exotic you should be able to make it happen....



  • @IRJ said in Print to CSV:

    @Pete-S said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Depends on what "integration" is.

    It might spit everything out in a single cell or split every word or something. There's almost no chance it will split the file as desired

    Again, it depends on what "integration" is. There are many ways to integrate something. It can be a common file format, it can be macros, it can be database queries etc etc.



  • @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Likely using the Excel automation API that is unique.



  • @scottalanmiller said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Likely using the Excel automation API that is unique.

    Not impossible but not likely. Especially not if it's software that runs on a server of some kind.

    "Integration" in order of complexity (I probably forgot some):

    • Files that Excel can open (csv files, html tables etc)
    • Simple Excel files, xls or xlsx
    • Excel files containing macros
    • Excel files with database links, web queries and/or programming
    • Excel add-ins (extends Excels functionality)
    • Excel automation (Excel is remotely controlled by another application)

    Only the two first are likely to be more or less openoffice compatible.



  • @scottalanmiller said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Likely using the Excel automation API that is unique.

    I spaced this one.

    I was thinking the application could be lame and trying to call the excel.exe executable directly. That could be solved with a link to LibreOffice executable - assuming the LibreOffice executable accepts the same arguments.



  • @Dashrender said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Likely using the Excel automation API that is unique.

    I spaced this one.

    I was thinking the application could be lame and trying to call the excel.exe executable directly. That could be solved with a link to LibreOffice executable - assuming the LibreOffice executable accepts the same arguments.

    In theory, yes. But I think it is using an API to make it output to CSV. Otherwise, we'd just expect it to open the file and sit there.



  • @Pete-S said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Likely using the Excel automation API that is unique.

    Not impossible but not likely. Especially not if it's software that runs on a server of some kind.

    "Integration" in order of complexity (I probably forgot some):

    • Files that Excel can open (csv files, html tables etc)

    Yeah, but keep in mind it's opening Excel in order to make the CSV, so it's not CSV that it is passing to Excel. And it isn't just opening Excel, but operating it, too. So it needs something to automate the tasks.



  • @scottalanmiller said in Print to CSV:

    @Dashrender said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Likely using the Excel automation API that is unique.

    I spaced this one.

    I was thinking the application could be lame and trying to call the excel.exe executable directly. That could be solved with a link to LibreOffice executable - assuming the LibreOffice executable accepts the same arguments.

    In theory, yes. But I think it is using an API to make it output to CSV. Otherwise, we'd just expect it to open the file and sit there.

    I assume then that using the API is easier than the application simply outputing to CSV on it's own? i.e. the app would need it's own API for that, and they didn't want to write one, so they decided to just glom onto Excel?



  • @scottalanmiller said in Print to CSV:

    @Pete-S said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Likely using the Excel automation API that is unique.

    Not impossible but not likely. Especially not if it's software that runs on a server of some kind.

    "Integration" in order of complexity (I probably forgot some):

    • Files that Excel can open (csv files, html tables etc)

    Yeah, but keep in mind it's opening Excel in order to make the CSV, so it's not CSV that it is passing to Excel. And it isn't just opening Excel, but operating it, too. So it needs something to automate the tasks.

    What did I miss that leads you to these conclusions - clearly I missed something.



  • @Dashrender said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @Pete-S said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Likely using the Excel automation API that is unique.

    Not impossible but not likely. Especially not if it's software that runs on a server of some kind.

    "Integration" in order of complexity (I probably forgot some):

    • Files that Excel can open (csv files, html tables etc)

    Yeah, but keep in mind it's opening Excel in order to make the CSV, so it's not CSV that it is passing to Excel. And it isn't just opening Excel, but operating it, too. So it needs something to automate the tasks.

    What did I miss that leads you to these conclusions - clearly I missed something.

    Because I know the app that he's trying to use.



  • @Dashrender said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @Dashrender said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Likely using the Excel automation API that is unique.

    I spaced this one.

    I was thinking the application could be lame and trying to call the excel.exe executable directly. That could be solved with a link to LibreOffice executable - assuming the LibreOffice executable accepts the same arguments.

    In theory, yes. But I think it is using an API to make it output to CSV. Otherwise, we'd just expect it to open the file and sit there.

    I assume then that using the API is easier than the application simply outputing to CSV on it's own?

    I doubt it.



  • @scottalanmiller said in Print to CSV:

    @Dashrender said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @Dashrender said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Likely using the Excel automation API that is unique.

    I spaced this one.

    I was thinking the application could be lame and trying to call the excel.exe executable directly. That could be solved with a link to LibreOffice executable - assuming the LibreOffice executable accepts the same arguments.

    In theory, yes. But I think it is using an API to make it output to CSV. Otherwise, we'd just expect it to open the file and sit there.

    I assume then that using the API is easier than the application simply outputing to CSV on it's own?

    I doubt it.

    It's harder, but it all depends. I've done software projects with MS Office automation (aka com objects). It's not the smartest way to do things but sometimes the only way (very seldom for Excel though).



  • @scottalanmiller said in Print to CSV:

    @Pete-S said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Likely using the Excel automation API that is unique.

    Not impossible but not likely. Especially not if it's software that runs on a server of some kind.

    "Integration" in order of complexity (I probably forgot some):

    • Files that Excel can open (csv files, html tables etc)

    Yeah, but keep in mind it's opening Excel in order to make the CSV, so it's not CSV that it is passing to Excel. And it isn't just opening Excel, but operating it, too. So it needs something to automate the tasks.

    Yeah, it's the excel com objects. But normally you would run those hidden without actually invoking the gui.



  • @scottalanmiller said in Print to CSV:

    @Dashrender said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @Dashrender said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Likely using the Excel automation API that is unique.

    I spaced this one.

    I was thinking the application could be lame and trying to call the excel.exe executable directly. That could be solved with a link to LibreOffice executable - assuming the LibreOffice executable accepts the same arguments.

    In theory, yes. But I think it is using an API to make it output to CSV. Otherwise, we'd just expect it to open the file and sit there.

    I assume then that using the API is easier than the application simply outputing to CSV on it's own?

    I doubt it.

    sooooo... they did it why? bad programmers?



  • @Dashrender said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @Dashrender said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @Dashrender said in Print to CSV:

    @scottalanmiller said in Print to CSV:

    @CCWTech said in Print to CSV:

    From what I can tell the program we are using has a built in integration for Excel but you have to have Excel and not something like Libre Office.

    Likely using the Excel automation API that is unique.

    I spaced this one.

    I was thinking the application could be lame and trying to call the excel.exe executable directly. That could be solved with a link to LibreOffice executable - assuming the LibreOffice executable accepts the same arguments.

    In theory, yes. But I think it is using an API to make it output to CSV. Otherwise, we'd just expect it to open the file and sit there.

    I assume then that using the API is easier than the application simply outputing to CSV on it's own?

    I doubt it.

    sooooo... they did it why? bad programmers?

    Always, or they just hate the users. But the latter would be crazy.


Log in to reply