Solved

Alternatives to  

Posted on 2003-12-02
19
1,118 Views
Last Modified: 2012-05-04
Does anyone know of an alternate way to add spaces to HTML without using " "?

Our users are opening an HTML page we have created in Excel. Everything is fine except the space convert to A0 in Excel and Excel doesn't know what to do with them.
0
Comment
Question by:feign3
  • 3
  • 3
  • 3
  • +5
19 Comments
 
LVL 31

Accepted Solution

by:
seanpowell earned 50 total points
ID: 9858590
Have you tried using the spacerun attribute - Excel should be okay with it:

Hello<span style="mso-spacerun: yes">     </span>There
0
 
LVL 4

Expert Comment

by:bschwarz6
ID: 9858609
unfortunately, i believe this is the only way to add more than one space between characters.
you can check out the W3 for more information:
http://www.w3.org/TR/1998/REC-html40-19980424/struct/text.html

I am unsure what you are saying in the second part of your question:

"Everything is fine except the space convert to A0 in Excel and Excel doesn't know what to do with them."

if you could elaborate on that, i could give a shot at a solution.


b
0
 

Author Comment

by:feign3
ID: 9858646
Hi bschwarz,

I just meant that Excel turns the "&nbsp;"'s into "A0". Not really relevent... just suffice it to say that Excel doesn't like the HTML spaces.
0
 
LVL 11

Expert Comment

by:Zontar
ID: 9858666
Why specifically are you adding non-breaking spaces to the page?

Perhaps your design can be changed to eliminate the need for them.
0
 
LVL 2

Expert Comment

by:Netwing
ID: 9858754
Use transparent Spacing Gifs for the Spacing! I think with these Images it should work in Excel too.
0
 

Author Comment

by:feign3
ID: 9858794
Zontar,

It's a customer specified report created using Oracle's iAS. The design must remain the same.
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9858841
I take it the spacerun attribute didn't do the trick?
0
 
LVL 3

Expert Comment

by:mrh30
ID: 9858864
Could always use <pre> </pre> round the text and then give it an appropriate style to make it look like the rest of the text.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Expert Comment

by:Netwing
ID: 9859007
..or use a white -  for the spacing on the white background it should be invisible for our humen eyes...i know it's dirty but it's a solution.
0
 

Author Comment

by:feign3
ID: 9859082
seanpowell,

Haven't had a chance to try it yet. I'll be able to tell you in about 30 minutes.

It sounds the most promising.
0
 

Expert Comment

by:Nelson_Pires
ID: 9866400
Alternatively if you use ASP, you could parse it to replace all HTML space codes to proper spaces ( ), use the replace function like this:

parsedSPACE = yourDataWithSpaces
parsedSPACE = Replace(parsedSPACE, "&nbsp;", " ", 1, -1, 1)

Now the parsedSPACE will be holding everything but with proper spaces.
0
 
LVL 1

Expert Comment

by:dazzled1
ID: 9942431
 
Using a pl/sql procedure you might be able to do something like this...


This is how I usually write excel files from 9iAS

The chr(9) bit is the bit that puts the space in!

 owa_util.mime_header( 'application/excel' );
   for x in ( select * from employees) loop
      htp.p( x.name || chr(9) || x.surname);
   end loop;

0
 
LVL 11

Expert Comment

by:Zontar
ID: 9942898
> It's a customer specified report created using Oracle's iAS. The design must remain the same.

You didn't answer my question.
0
 
LVL 1

Expert Comment

by:dazzled1
ID: 9944482


   Well try putting this  &#009

   in the same way you would put &nbsp..


   By the way the 9 is TAB but there are other ascii characters that may work aswell!!


Enjoy....


(http://www.efn.org/~gjb/asciidec.html - A table of all ascii characters - just substitute the decimal number for the 009. EG &#112 etc...
0
 
LVL 11

Expert Comment

by:Zontar
ID: 9944787
dazzled1 -- don't forget the terminal semicolon in character entities.

&#009; not &#009

What I was going to suggest was using CSS padding and/or margins and/or text0indent, but feign3 is not going to play along by provding a link and/or source and/or description, so I can't actually provide a possible solution making use of it.
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 10800871
http:#9858590 should work in any instance of Excel, AFAIK.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now