Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. I Don't Know Where To Look

I Don't Know Where To Look

Scheduled Pinned Locked Moved The Lounge
csharpquestiontoolshelp
8 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Roger Wright
    wrote on last edited by
    #1

    I'm not interested in getting programming answers here, of course, but I could use some guidance on where to look for answers to a programming problem I have at work. As you can imagine, not much useful stuff comes back when I Google for "how do I programmatically export a single worksheet in an Excel workbook to a .csv formatted file without opening Excel?" Lots of responses, of course, but far more chaff than wheat... That, in a nutshell, is what I want to do, but I really don't want to have to deal with VBA. I'm certain there's something in the .Net world that will allow me to do this with C#, but I haven't a clue anymore where to look. As I've mentioned, I'm trying to automate the process of monitoring our electric utility's efficiency using, as part of the process data, the reports I get from suppliers. As it turns out, the daily emails I receive are worthless, as multiple sources have low precision, and rounding errors are killing me. The only other source is a monthly spreadsheet I receive, but only one sheet of the total package is relevant. On a positive note, this spreadsheet data is all normalized to a common precision and audited for errors. I want to offload this crap to some other sucker in the office, but none of them have enough computer savvy to get it right if I ask them to open the workbook and manually export the useful sheet to the specified folder for processing. I need to make this whole shebang as automatic as possible if it's going to work at all, or I can look forward to doing this mind-numbingly boring task myself for all time to come. Where should I look to learn to do this task?

    Will Rogers never met me.

    B J M F L 7 Replies Last reply
    0
    • R Roger Wright

      I'm not interested in getting programming answers here, of course, but I could use some guidance on where to look for answers to a programming problem I have at work. As you can imagine, not much useful stuff comes back when I Google for "how do I programmatically export a single worksheet in an Excel workbook to a .csv formatted file without opening Excel?" Lots of responses, of course, but far more chaff than wheat... That, in a nutshell, is what I want to do, but I really don't want to have to deal with VBA. I'm certain there's something in the .Net world that will allow me to do this with C#, but I haven't a clue anymore where to look. As I've mentioned, I'm trying to automate the process of monitoring our electric utility's efficiency using, as part of the process data, the reports I get from suppliers. As it turns out, the daily emails I receive are worthless, as multiple sources have low precision, and rounding errors are killing me. The only other source is a monthly spreadsheet I receive, but only one sheet of the total package is relevant. On a positive note, this spreadsheet data is all normalized to a common precision and audited for errors. I want to offload this crap to some other sucker in the office, but none of them have enough computer savvy to get it right if I ask them to open the workbook and manually export the useful sheet to the specified folder for processing. I need to make this whole shebang as automatic as possible if it's going to work at all, or I can look forward to doing this mind-numbingly boring task myself for all time to come. Where should I look to learn to do this task?

      Will Rogers never met me.

      B Offline
      B Offline
      BotCar
      wrote on last edited by
      #2

      Have you looked at Office Interop? I've never tried exporting a worksheet with it before, but I would guess that it's possible. And I know for a fact you can hide the UI (IIRC, you only need to set a flag). There's also a way (not sure if it is part of interop or not) to treat an Excel document as a database, with each worksheet being a table. I've never worked with it (never needed it, and it seems kinda awkward), so I don't know all the ins and outs. If you're interested, I can see if I can dig up some more info to get you started.

      What is this talk of release? I do not release software. My software escapes leaving a bloody trail of designers and quality assurance people in its wake.

      1 Reply Last reply
      0
      • R Roger Wright

        I'm not interested in getting programming answers here, of course, but I could use some guidance on where to look for answers to a programming problem I have at work. As you can imagine, not much useful stuff comes back when I Google for "how do I programmatically export a single worksheet in an Excel workbook to a .csv formatted file without opening Excel?" Lots of responses, of course, but far more chaff than wheat... That, in a nutshell, is what I want to do, but I really don't want to have to deal with VBA. I'm certain there's something in the .Net world that will allow me to do this with C#, but I haven't a clue anymore where to look. As I've mentioned, I'm trying to automate the process of monitoring our electric utility's efficiency using, as part of the process data, the reports I get from suppliers. As it turns out, the daily emails I receive are worthless, as multiple sources have low precision, and rounding errors are killing me. The only other source is a monthly spreadsheet I receive, but only one sheet of the total package is relevant. On a positive note, this spreadsheet data is all normalized to a common precision and audited for errors. I want to offload this crap to some other sucker in the office, but none of them have enough computer savvy to get it right if I ask them to open the workbook and manually export the useful sheet to the specified folder for processing. I need to make this whole shebang as automatic as possible if it's going to work at all, or I can look forward to doing this mind-numbingly boring task myself for all time to come. Where should I look to learn to do this task?

        Will Rogers never met me.

        J Offline
        J Offline
        Jorgen Andersson
        wrote on last edited by
        #3

        Well, I can't tell you where to look, but I'd tell you how I'd do it and from there you can look up the pieces. First I'd read the excel sheet into a datareader using OleDB. The sheetname equals the tablename in a database. Then I'd read every record from the reader into a string array and copy this array into a CSV file using String.join(",",array) (assuming dotnet 4 here)

        Be excellent to each other. And... PARTY ON, DUDES! Abraham Lincoln

        1 Reply Last reply
        0
        • R Roger Wright

          I'm not interested in getting programming answers here, of course, but I could use some guidance on where to look for answers to a programming problem I have at work. As you can imagine, not much useful stuff comes back when I Google for "how do I programmatically export a single worksheet in an Excel workbook to a .csv formatted file without opening Excel?" Lots of responses, of course, but far more chaff than wheat... That, in a nutshell, is what I want to do, but I really don't want to have to deal with VBA. I'm certain there's something in the .Net world that will allow me to do this with C#, but I haven't a clue anymore where to look. As I've mentioned, I'm trying to automate the process of monitoring our electric utility's efficiency using, as part of the process data, the reports I get from suppliers. As it turns out, the daily emails I receive are worthless, as multiple sources have low precision, and rounding errors are killing me. The only other source is a monthly spreadsheet I receive, but only one sheet of the total package is relevant. On a positive note, this spreadsheet data is all normalized to a common precision and audited for errors. I want to offload this crap to some other sucker in the office, but none of them have enough computer savvy to get it right if I ask them to open the workbook and manually export the useful sheet to the specified folder for processing. I need to make this whole shebang as automatic as possible if it's going to work at all, or I can look forward to doing this mind-numbingly boring task myself for all time to come. Where should I look to learn to do this task?

          Will Rogers never met me.

          M Offline
          M Offline
          Mark_Wallace
          wrote on last edited by
          #4

          I had to do something similar a while ago, and found this site[^] (AIRI, it looked even worse, then). I had to download the office.interop library; I'm not sure you have to, any more. I do remember it being bloody fiddly and annoying, though, so good luck.

          I wanna be a eunuchs developer! Pass me a bread knife!

          1 Reply Last reply
          0
          • R Roger Wright

            I'm not interested in getting programming answers here, of course, but I could use some guidance on where to look for answers to a programming problem I have at work. As you can imagine, not much useful stuff comes back when I Google for "how do I programmatically export a single worksheet in an Excel workbook to a .csv formatted file without opening Excel?" Lots of responses, of course, but far more chaff than wheat... That, in a nutshell, is what I want to do, but I really don't want to have to deal with VBA. I'm certain there's something in the .Net world that will allow me to do this with C#, but I haven't a clue anymore where to look. As I've mentioned, I'm trying to automate the process of monitoring our electric utility's efficiency using, as part of the process data, the reports I get from suppliers. As it turns out, the daily emails I receive are worthless, as multiple sources have low precision, and rounding errors are killing me. The only other source is a monthly spreadsheet I receive, but only one sheet of the total package is relevant. On a positive note, this spreadsheet data is all normalized to a common precision and audited for errors. I want to offload this crap to some other sucker in the office, but none of them have enough computer savvy to get it right if I ask them to open the workbook and manually export the useful sheet to the specified folder for processing. I need to make this whole shebang as automatic as possible if it's going to work at all, or I can look forward to doing this mind-numbingly boring task myself for all time to come. Where should I look to learn to do this task?

            Will Rogers never met me.

            F Offline
            F Offline
            Fredrik Bornander
            wrote on last edited by
            #5

            epplus project at codeplex. /Fredrik

            My Android apps in Google Play; Oakmead Apps

            1 Reply Last reply
            0
            • R Roger Wright

              I'm not interested in getting programming answers here, of course, but I could use some guidance on where to look for answers to a programming problem I have at work. As you can imagine, not much useful stuff comes back when I Google for "how do I programmatically export a single worksheet in an Excel workbook to a .csv formatted file without opening Excel?" Lots of responses, of course, but far more chaff than wheat... That, in a nutshell, is what I want to do, but I really don't want to have to deal with VBA. I'm certain there's something in the .Net world that will allow me to do this with C#, but I haven't a clue anymore where to look. As I've mentioned, I'm trying to automate the process of monitoring our electric utility's efficiency using, as part of the process data, the reports I get from suppliers. As it turns out, the daily emails I receive are worthless, as multiple sources have low precision, and rounding errors are killing me. The only other source is a monthly spreadsheet I receive, but only one sheet of the total package is relevant. On a positive note, this spreadsheet data is all normalized to a common precision and audited for errors. I want to offload this crap to some other sucker in the office, but none of them have enough computer savvy to get it right if I ask them to open the workbook and manually export the useful sheet to the specified folder for processing. I need to make this whole shebang as automatic as possible if it's going to work at all, or I can look forward to doing this mind-numbingly boring task myself for all time to come. Where should I look to learn to do this task?

              Will Rogers never met me.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Working with MS Excel(xls / xlsx) Using MDAC and Oledb[^] and Using OleDb to Import Text Files (tab, CSV, custom)[^] give some really useful information.

              Veni, vidi, abiit domum

              1 Reply Last reply
              0
              • R Roger Wright

                I'm not interested in getting programming answers here, of course, but I could use some guidance on where to look for answers to a programming problem I have at work. As you can imagine, not much useful stuff comes back when I Google for "how do I programmatically export a single worksheet in an Excel workbook to a .csv formatted file without opening Excel?" Lots of responses, of course, but far more chaff than wheat... That, in a nutshell, is what I want to do, but I really don't want to have to deal with VBA. I'm certain there's something in the .Net world that will allow me to do this with C#, but I haven't a clue anymore where to look. As I've mentioned, I'm trying to automate the process of monitoring our electric utility's efficiency using, as part of the process data, the reports I get from suppliers. As it turns out, the daily emails I receive are worthless, as multiple sources have low precision, and rounding errors are killing me. The only other source is a monthly spreadsheet I receive, but only one sheet of the total package is relevant. On a positive note, this spreadsheet data is all normalized to a common precision and audited for errors. I want to offload this crap to some other sucker in the office, but none of them have enough computer savvy to get it right if I ask them to open the workbook and manually export the useful sheet to the specified folder for processing. I need to make this whole shebang as automatic as possible if it's going to work at all, or I can look forward to doing this mind-numbingly boring task myself for all time to come. Where should I look to learn to do this task?

                Will Rogers never met me.

                R Offline
                R Offline
                Rage
                wrote on last edited by
                #7

                So basically, you do not want to open a spreadsheet once in a month to export its content to a .csv file ?

                ~RaGE();

                I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus Do not feed the troll ! - Common proverb

                1 Reply Last reply
                0
                • R Roger Wright

                  I'm not interested in getting programming answers here, of course, but I could use some guidance on where to look for answers to a programming problem I have at work. As you can imagine, not much useful stuff comes back when I Google for "how do I programmatically export a single worksheet in an Excel workbook to a .csv formatted file without opening Excel?" Lots of responses, of course, but far more chaff than wheat... That, in a nutshell, is what I want to do, but I really don't want to have to deal with VBA. I'm certain there's something in the .Net world that will allow me to do this with C#, but I haven't a clue anymore where to look. As I've mentioned, I'm trying to automate the process of monitoring our electric utility's efficiency using, as part of the process data, the reports I get from suppliers. As it turns out, the daily emails I receive are worthless, as multiple sources have low precision, and rounding errors are killing me. The only other source is a monthly spreadsheet I receive, but only one sheet of the total package is relevant. On a positive note, this spreadsheet data is all normalized to a common precision and audited for errors. I want to offload this crap to some other sucker in the office, but none of them have enough computer savvy to get it right if I ask them to open the workbook and manually export the useful sheet to the specified folder for processing. I need to make this whole shebang as automatic as possible if it's going to work at all, or I can look forward to doing this mind-numbingly boring task myself for all time to come. Where should I look to learn to do this task?

                  Will Rogers never met me.

                  N Offline
                  N Offline
                  Nicholas Butler
                  wrote on last edited by
                  #8

                  Obligatory xkcd: http://xkcd.com/1205/[^]

                  www.NickButler.net

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups