Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1158
  • Last Modified:

Alternatives to  

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
feign3
Asked:
feign3
  • 3
  • 3
  • 3
  • +5
1 Solution
 
seanpowellCommented:
Have you tried using the spacerun attribute - Excel should be okay with it:

Hello<span style="mso-spacerun: yes">     </span>There
0
 
bschwarz6Commented:
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
 
feign3Author Commented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
ZontarCommented:
Why specifically are you adding non-breaking spaces to the page?

Perhaps your design can be changed to eliminate the need for them.
0
 
NetwingCommented:
Use transparent Spacing Gifs for the Spacing! I think with these Images it should work in Excel too.
0
 
feign3Author Commented:
Zontar,

It's a customer specified report created using Oracle's iAS. The design must remain the same.
0
 
seanpowellCommented:
I take it the spacerun attribute didn't do the trick?
0
 
mrh30Commented:
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
 
NetwingCommented:
..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
 
feign3Author Commented:
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
 
Nelson_PiresCommented:
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
 
dazzled1Commented:
 
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
 
ZontarCommented:
> It's a customer specified report created using Oracle's iAS. The design must remain the same.

You didn't answer my question.
0
 
dazzled1Commented:


   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
 
ZontarCommented:
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
 
seanpowellCommented:
http:#9858590 should work in any instance of Excel, AFAIK.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
  • 3
  • +5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now