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. XML / XSL
  4. SpreadsheetML Problem

SpreadsheetML Problem

Scheduled Pinned Locked Moved XML / XSL
graphicshelptutorialquestion
2 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.
  • J Offline
    J Offline
    jain ashish21
    wrote on last edited by
    #1

    I am trying to create an Excel file with the XMLTextWriter class. I am successfully able to write the excel file with data from dataset in it. But the problem is that the string data being written in Excel is not visible fully in the cells. I tried the option of AutoFitWidth="1", But it does not comes into effect for String data. I also got some clue for using System.Drawing.Graphics.MeasureString method. But I am not able to use it in Web project. Can anyone guide me as to how can I fit the width of the string text in excel cell programatically.

    If my mind can conceive it, and my heart can believe it, I know I can achieve it.

    M 1 Reply Last reply
    0
    • J jain ashish21

      I am trying to create an Excel file with the XMLTextWriter class. I am successfully able to write the excel file with data from dataset in it. But the problem is that the string data being written in Excel is not visible fully in the cells. I tried the option of AutoFitWidth="1", But it does not comes into effect for String data. I also got some clue for using System.Drawing.Graphics.MeasureString method. But I am not able to use it in Web project. Can anyone guide me as to how can I fit the width of the string text in excel cell programatically.

      If my mind can conceive it, and my heart can believe it, I know I can achieve it.

      M Offline
      M Offline
      Mark J Miller
      wrote on last edited by
      #2

      I don't know much about spreadsheetML, but if I recall autofit is a property of the column and not the cell. Are you setting it as a column property? Sorry, but if that doesn't fix the problem I really don't know what will. I don't normally jump into a topic I don't know that well, but since no one else has answered I thought I'd throw my hat in.

      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