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. C#
  4. c# LinqToExcel is not connecting to XLS in 64bit system but it is connecting xlsx file, tried DatabaseEngine.ace but didn't worked out.

c# LinqToExcel is not connecting to XLS in 64bit system but it is connecting xlsx file, tried DatabaseEngine.ace but didn't worked out.

Scheduled Pinned Locked Moved C#
csharplounge
4 Posts 4 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.
  • M Offline
    M Offline
    Member 11053420
    wrote on last edited by
    #1

    Code is string filepath = @"C:\\"+"k.xls"; string sheetName = "general_report"; var excelFile = new LinqToExcel.ExcelQueryFactory(filepath); excelFile.DatabaseEngine = DatabaseEngine.Ace;

    P L R 3 Replies Last reply
    0
    • M Member 11053420

      Code is string filepath = @"C:\\"+"k.xls"; string sheetName = "general_report"; var excelFile = new LinqToExcel.ExcelQueryFactory(filepath); excelFile.DatabaseEngine = DatabaseEngine.Ace;

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      Member 11053420 wrote:

      @"C:\\"

      Use either @ (verbatim string) or escape the backslash, not both. And why concatenate? string filepath = @"C:\k.xls"; ought to do it.

      1 Reply Last reply
      0
      • M Member 11053420

        Code is string filepath = @"C:\\"+"k.xls"; string sheetName = "general_report"; var excelFile = new LinqToExcel.ExcelQueryFactory(filepath); excelFile.DatabaseEngine = DatabaseEngine.Ace;

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

        Only works if the entire process is 64-bit. "Didn't work out", what does that mean? Did it throw an exception, did it explode?

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

        1 Reply Last reply
        0
        • M Member 11053420

          Code is string filepath = @"C:\\"+"k.xls"; string sheetName = "general_report"; var excelFile = new LinqToExcel.ExcelQueryFactory(filepath); excelFile.DatabaseEngine = DatabaseEngine.Ace;

          R Offline
          R Offline
          Raushank03
          wrote on last edited by
          #4

          To know your Better Solution please Visit on http://techgurulab.com/course/c-sharp-tutorial/

          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