473,811 Members | 3,532 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Excel wrap inside cell

What ASP code can I use, for an ASP-generated spreadsheet, to force a cell
to wrap if the content is longer than the width I have specified for that
cell?
Sep 16 '05 #1
6 5682

middletree wrote:
What ASP code can I use, for an ASP-generated spreadsheet, to force a cell
to wrap if the content is longer than the width I have specified for that
cell?


Here's the style that I use for that:

..text {mso-number-format:General; text-align:general;w hite-space:
normal;mso-spacerun: yes }

Sep 19 '05 #2
Didn't work for me.
<la**********@y ahoo.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .

middletree wrote:
What ASP code can I use, for an ASP-generated spreadsheet, to force a cell to wrap if the content is longer than the width I have specified for that cell?


Here's the style that I use for that:

.text {mso-number-format:General; text-align:general;w hite-space:
normal;mso-spacerun: yes }

Sep 19 '05 #3

middletree wrote:
Didn't work for me.
<la**********@y ahoo.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .

middletree wrote:
What ASP code can I use, for an ASP-generated spreadsheet, to force a cell to wrap if the content is longer than the width I have specified for that cell?


Here's the style that I use for that:

.text {mso-number-format:General; text-align:general;w hite-space:
normal;mso-spacerun: yes }


You put it in the TD?? I.e.

<td class="text"></td>

Sep 20 '05 #4
>
You put it in the TD?? I.e.

<td class="text"></td>

Yes, that's exactly what I did. Put the style code in the head section (no
external CSS for this page)

Sep 20 '05 #5

middletree wrote:

You put it in the TD?? I.e.

<td class="text"></td>

Yes, that's exactly what I did. Put the style code in the head section (no
external CSS for this page)


We should also be clear, this is for Excel right? What version?

This works for me with 2000 and higher.

What I do when I'm trying to figure out what code to use for a
particular Excel formatting is to create a 1 cell excel file, and save
as a web page. Then inspect the code to see what style it generates
for that cell.

Sep 21 '05 #6
I'm using Excel 2003. I'll be glad to post my ASP code if that will help.
Sep 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3213
by: Norman Fritag | last post by:
Hi there, 1) I is there a more elegant way, more professionally way this export could done, as I have written some code for the first time? 2) who could I wrap text cell a1 a3 via code ? 3) is there a tutorial whereas I refresh my knowledge? and here goes the code Regards
6
12510
by: Matthew Wieder | last post by:
I have the following requirements: Build a stand-alone C# application that asks the user to click in a cell in an Excel spreadsheet, and then displays the address of that cell in the C# application. It seems simple enough, but the problem I'm encountering is as follows: In order for the user to select the cell from Excel, they must first click once on the Excel window to give it focus and then their second click is what changes the cell...
0
19866
by: Carlos Lozano | last post by:
Hi, I have an application that creates Excel files and I ma having trouble formatting cells. I fill all cells required, sewt fonts and everything, but have a cell that contains multiple text rows. ie. Company one Address abc
1
5849
by: Glen Vermeylen | last post by:
Hi, For a project at school we have to automate the assignment of seats in classrooms to students during the exams. The lady who previously did everything manually kept the layouts of the classrooms in an excel-document: 1 sheet per classroom, and she marked the cells which represent the seats with a border. The problem however is that she sometimes merged cells together to get a better layout.
8
788
by: Sam | last post by:
Hi All, I posted this message few days ago. No one has answered so far. I just would like to know if it is possible to do or not. Even if you can not tell me how to do this, maybe you know which library I need to use in order to access excel information from a VB.NET code. For example, I would be interested by knowing how to access a simple cell value in an excel file from a vb.net code. Here is the mail I sent last week, but as I...
6
12600
by: Kevin Humphreys | last post by:
Hi There, I am trying to export a recordset to an excel file using the Content Type below in the header. Response.ContentType = "application/vnd.ms-excel" Which works fine however the problem is that when I have a number in a column with a leading zero the zero gets dropped.
0
1681
by: Bryan Ax | last post by:
I'm trying to fix a bug in someone else's code. He's got a string saved in a database such as: <xsl:variable name="Var1"> <xsl:choose> <xsl:when test="@SomeAttribute &gt; 1'"> <xsl:value-of select="'Y'"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="'N'"/>
6
24584
by: McKirahan | last post by:
I an using ASP to read a database table and generate an HTML table which is save via FSO with a file extension of .xls which opens up in MS-Excel. I am inserting several lines of text into a cell and would like to force a line break between them. I recorded an MS-Excel macro so see how Alt-Enter was captured which turned out to be Chr(10) which is the same as vbLf (right?) I tried inserting that in character in the text but it didn't...
2
2892
by: Brian Parker | last post by:
I need to format text in cell in an Excel worksheet and I need to do this using C#. I've seen code that will set the format for the whole cell, but I just need to format one character in that cell. Example: The cell has this text in it: H20 I need to use C# to change the "2" to be a subscript.
0
9604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10394
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9201
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7665
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.