Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loss of characters (? instead)
A colleague of mine (who has left) wrote a macro for moving a .xls file to another environment. Until now it worked fine. The characterset in the .xls file supports characters like ĻĒŪĪ, etc. The resultfile however does not contain any of these characters, but a question mark instead (?). What is wrong in the code? Workbooks.OpenText Filename:=MyInput, Origin:=28603 _ , StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 1), Array( _ 48, 1)), TrailingMinusNumbers:=True ActiveWorkbook.SaveAs Filename:=MyFile, FileFormat:= _ xlTextPrinter, CreateBackup:=False Thanks for any response, Ingrid -- IngDah_Blk ------------------------------------------------------------------------ IngDah_Blk's Profile: http://www.excelforum.com/member.php...o&userid=36754 View this thread: http://www.excelforum.com/showthread...hreadid=564708 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loss of characters (? instead)
I find code page/character set stuff confusing, but it seems that you are
opening a text file with a code page of 28603, Estonian (ISO), then saving as a .PRN file. Not sure, but does the output of xlTextPrinter depend on the capabilities of ActivePrinter ? e.g. One printer may be able to represent your file correctly, but another may not. NickHK "IngDah_Blk" wrote in message ... A colleague of mine (who has left) wrote a macro for moving a .xls file to another environment. Until now it worked fine. The characterset in the .xls file supports characters like ĻĒŪĪ, etc. The resultfile however does not contain any of these characters, but a question mark instead (?). What is wrong in the code? Workbooks.OpenText Filename:=MyInput, Origin:=28603 _ , StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 1), Array( _ 48, 1)), TrailingMinusNumbers:=True ActiveWorkbook.SaveAs Filename:=MyFile, FileFormat:= _ xlTextPrinter, CreateBackup:=False Thanks for any response, Ingrid -- IngDah_Blk ------------------------------------------------------------------------ IngDah_Blk's Profile: http://www.excelforum.com/member.php...o&userid=36754 View this thread: http://www.excelforum.com/showthread...hreadid=564708 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loss of characters (? instead)
Thanks for the response. I was not aware that 28603 was the codepage for Estland, although know the macro is for Estland. The major change I want to make, is making this macro suitable voo Letland, because it doesn't now. According to the documentation of codepages, 28603 is the codepage fo ISO 8859-13 Latin 7 (Baltic) which should also support Letlan characters. I haven't used a printer yet, I just open the created file with Word o Excel and then the ? appear -- IngDah_Bl ----------------------------------------------------------------------- IngDah_Blk's Profile: http://www.excelforum.com/member.php...fo&userid=3675 View this thread: http://www.excelforum.com/showthread.php?threadid=56470 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loss of characters (? instead)
Thanks for the response. I was not aware that 28603 was the codepage for Estland, although know the macro is for Estland. The major change I want to make, is making this macro suitable voo Letland, because it doesn't now. According to the documentation of codepages, 28603 is the codepage fo ISO 8859-13 Latin 7 (Baltic) which should also support Letlan characters. I haven't used a printer yet, I just open the created file with Word o Excel and then the ? appear -- IngDah_Bl ----------------------------------------------------------------------- IngDah_Blk's Profile: http://www.excelforum.com/member.php...fo&userid=3675 View this thread: http://www.excelforum.com/showthread.php?threadid=56470 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loss of characters (? instead)
As far as I can tell, saving the file as xlTextPrinter only includes ANSI
characters, so anything greater than ASC(255) will appear as a "?". If you use xlUnicodeText instead, does it work correctly ? There is also the TextCodePage argument to the .SaveAs method, but as the help says "Not used in U.S. English Microsoft Excel", I can't tell you if it would help you. NickHK "IngDah_Blk" wrote in message ... Thanks for the response. I was not aware that 28603 was the codepage for Estland, although I know the macro is for Estland. The major change I want to make, is making this macro suitable voor Letland, because it doesn't now. According to the documentation of codepages, 28603 is the codepage for ISO 8859-13 Latin 7 (Baltic) which should also support Letland characters. I haven't used a printer yet, I just open the created file with Word or Excel and then the ? appear. -- IngDah_Blk ------------------------------------------------------------------------ IngDah_Blk's Profile: http://www.excelforum.com/member.php...o&userid=36754 View this thread: http://www.excelforum.com/showthread...hreadid=564708 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loss of characters (? instead)
Thanks again for your help. After changing xlTextPrinter into xlUnicodeText the created file show the Letvia characters I had put in. I works perfect now. Case solved. : -- IngDah_Bl ----------------------------------------------------------------------- IngDah_Blk's Profile: http://www.excelforum.com/member.php...fo&userid=3675 View this thread: http://www.excelforum.com/showthread.php?threadid=56470 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
hardship letter explaining devastating loss property loss financi | Excel Discussion (Misc queries) | |||
convert 5 characters in a cell to 6 characters by adding a zero | Excel Discussion (Misc queries) | |||
Insert Leading Characters If String Is Only 7 Characters | Excel Discussion (Misc queries) | |||
In Excel find characters when multiple characters exist w/i a cel | Excel Worksheet Functions | |||
Weight loss line chart to monitor weight loss progress | Charts and Charting in Excel |