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. Database & SysAdmin
  3. Database
  4. ODBC & SQL - Modify the "Table" name in Excel

ODBC & SQL - Modify the "Table" name in Excel

Scheduled Pinned Locked Moved Database
c++databasehelptutorialquestion
3 Posts 2 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.
  • S Offline
    S Offline
    Stefan_L_01
    wrote on last edited by
    #1

    Hello I´m new to this board, and found already some good advice here, but for this problem i didn´t find an answer so far. I already have an Excel-Doc that consists of several sheets. I need to write now in the 3rd sheet data, from the first row to row 40 in column 2 for example. The problem is that the row doesn´t has a header, what would identify the column as a "table". But that´s no problem, because i can fetch a Recordset to a column for example. But this allows me only to modify row 2 and all further rows, but not the first row where ODBC expects the table name. But i also have to modify the first row, i MUST :) Does anyone know to access by ODBC & SQL a EXCEL sheet/data from c++ on and writing at desired column and row position data? Thank you

    D 1 Reply Last reply
    0
    • S Stefan_L_01

      Hello I´m new to this board, and found already some good advice here, but for this problem i didn´t find an answer so far. I already have an Excel-Doc that consists of several sheets. I need to write now in the 3rd sheet data, from the first row to row 40 in column 2 for example. The problem is that the row doesn´t has a header, what would identify the column as a "table". But that´s no problem, because i can fetch a Recordset to a column for example. But this allows me only to modify row 2 and all further rows, but not the first row where ODBC expects the table name. But i also have to modify the first row, i MUST :) Does anyone know to access by ODBC & SQL a EXCEL sheet/data from c++ on and writing at desired column and row position data? Thank you

      D Offline
      D Offline
      DanielO
      wrote on last edited by
      #2

      hi, perhaps you could use automation execel look at www.microsoft.com - knowledge base HOWTO: Create Automation Project Using MFC and a Type Library (Q178749) HOWTO: Use MFC to Automate Excel and Create/Format a New Workbook (Q179706) hope it helps Daniel O

      S 1 Reply Last reply
      0
      • D DanielO

        hi, perhaps you could use automation execel look at www.microsoft.com - knowledge base HOWTO: Create Automation Project Using MFC and a Type Library (Q178749) HOWTO: Use MFC to Automate Excel and Create/Format a New Workbook (Q179706) hope it helps Daniel O

        S Offline
        S Offline
        Stefan_L_01
        wrote on last edited by
        #3

        Thank you , the second HOWTA article looks very interesting and elegant. Meanwhile i managed to do it by dropping a Column, for example with [Sheet1$A:A] as tablename, and creating a new Table with same syntax passing a new "table" name. niklas

        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