start excel and decimal point

T

tonts

Hi,

Could anybody help me ?

I have a trouble with starting excel and the local parameters...

I have made a .xls file with a SAS programm. This .xls file contain numeric
fields, text fields, ... and number with decimal point.
The decimal separator is the point(".").

I'm in France, so my local parameters tells excel that the decimal separator
is the comma (",").

When I double-click on the .xls file, the result is good : all the numéric
field with decimals are change from xxx.xx th xxx,xx

But when I start excel from my application SAS and I give the file to open
(.xls), the result is that the decimal fields are not convertef
form xxx.xx to xxx,xx

You can show it if you create a .txt file with NotePad : write 12.23 in the
..txt file, then renamed it in windows in .xls file.
If you double-click on this .xls file, the result is ok : 12.23 converted
into 12,23
But if you start excel and open the .xls file, after the formatting screens,
the result is not ok : the 12.23 is not converted
into 12,23 ....

I'm in excel 2000.

I can't use VBA script or macros because I start excel from SAS.

I'm searching a trick to start excel and tell him he have to take care of
local parameters (and transforming the "." decimal into "," decimal.

Thanks you very much for your help.

Pascal
 
D

Dave Peterson

See one reply at one of your other posts.

It's not usually necessary to post to multiple groups. If you think that it is,
it would be better for you to include all the groups in one post (called
crossposting).

If you send different messages at different times (called multiposting), then it
makes it much more difficult for you to find a correct response. And it just
causes people to duplicate existing answers.

And the part that I would find the worst is that you could have different
threads in various stages of "development". Sometimes, it's very nice to see a
bunch of suggestions that build on each other.
 
K

keepITcool

a quick seach with google on "excel sas decimal export" shows:
a.o.

http://www.pace.edu/nesug/proceedings/nesug01/cc/Cc4011.pdf
http://www2.sas.com/proceedings/sugi28/250-28.pdf

e.g.
this appears to be a typical SAS problem.

renaming a file to xls doesn't make a an xls file.
it will just force excel to be the opening application.

excel is reasonably clever when opening txt files, but
less so when opening .csv files.

try renaming the exported dataset to .txt before you
open it it excel.

if that works...
you might consider making a dummy file extension
(like .SASdat and associate that extension with excel.exe

since it will be an unknown datatype excel will try opening it as a
textfile.

hth



keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 
T

tonts

ok, I found the solution.

Modifiyng he TAGSET in SAS and add in the head section of the Html the code
below :

style type="text/css">
table {
mso-displayed-decimal-separator: "." ;
}
</style>

The numeric fields with decimals are made in SAS with the format xx.xx
(point) and excel change it into a comma (",") in both case (open excel and
load the .xls file or double-click on the .xls file).

Thanks to all
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top