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. General Programming
  3. .NET (Core and Framework)
  4. working with excel

working with excel

Scheduled Pinned Locked Moved .NET (Core and Framework)
tutorialdatabasequestion
5 Posts 3 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.
  • B Offline
    B Offline
    byka
    wrote on last edited by
    #1

    I have an excel template where some rows marked as headers. For example Row1-> header, Row20-Header. I will be getting data from sql however i am not sure how to deal with headers because my datarow count will not be the same. how would I handle this situation?

    D A 2 Replies Last reply
    0
    • B byka

      I have an excel template where some rows marked as headers. For example Row1-> header, Row20-Header. I will be getting data from sql however i am not sure how to deal with headers because my datarow count will not be the same. how would I handle this situation?

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Handle what situation? Your description of what you have is OK, but your description of what you're doing is completely missing.

      A guide to posting questions on CodeProject

      How to debug small programs
      Dave Kreskowiak

      1 Reply Last reply
      0
      • B byka

        I have an excel template where some rows marked as headers. For example Row1-> header, Row20-Header. I will be getting data from sql however i am not sure how to deal with headers because my datarow count will not be the same. how would I handle this situation?

        A Offline
        A Offline
        AmitGajjar
        wrote on last edited by
        #3

        I am not sure what you are trying to do. As per my understanding you have multiple tables in single sheet with user defined header rows. And your not sure how you could fit the data inside other data rows. is this your problem ?

        B 1 Reply Last reply
        0
        • A AmitGajjar

          I am not sure what you are trying to do. As per my understanding you have multiple tables in single sheet with user defined header rows. And your not sure how you could fit the data inside other data rows. is this your problem ?

          B Offline
          B Offline
          byka
          wrote on last edited by
          #4

          correct

          A 1 Reply Last reply
          0
          • B byka

            correct

            A Offline
            A Offline
            AmitGajjar
            wrote on last edited by
            #5

            Hope you know how can you store your sql data into excel file. Your confusion is with only header rows. Here is one possible solution, You can read your template and check with your header. Place your data row until another header row appear in your template excel. If your data exceed and it look to overwrite your next table you can add one new row there. once you found next template header row you can read your next sql table and store row by row. hope this will work for you. Thanks Amit

            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