DataBase/Oracle
Excel 파일에 숫자로 된 문자열 쓰기!
고독한마법사
2008. 4. 28. 13:53
엑셀 파일에 '00001' 이라는 문자를 쓰게 되면 '1'로 되어 버립니다. 의도했던 '00001' 이라는 문자는 사라지고 '1'이 써져 있다면 황당 하겠죠^^
아래에 이를 해결하는 예가 있으니 참고 바랍니다.
===========================================
declare
in_file Text_IO.File_Type;
linebuf VARCHAR2(1800);
filename VARCHAR2(30);
var_dir_dde pls_integer;
BEGIN
filename:='c:\'||:bloque1.tei_archivo||'.xls';
in_file := Text_IO.Fopen(filename, 'w');
linebuf := '=TEXTO(1,"00000")';
Text_IO.put_Line(in_file, linebuf);
Text_IO.New_Line;
Text_IO.Fclose(in_file);
-- The path for Program Excel, would be due to obtain dynamically, with D2KWUTIL.
var_dir_dde := DDE.App_Begin('c:\program files\microsoft office\office\excel.exe
'||filename,DDE.App_Mode_Maximized); -- opens
DDE.App_Focus(var_dir_dde);
END;
아래에 이를 해결하는 예가 있으니 참고 바랍니다.
===========================================
declare
in_file Text_IO.File_Type;
linebuf VARCHAR2(1800);
filename VARCHAR2(30);
var_dir_dde pls_integer;
BEGIN
filename:='c:\'||:bloque1.tei_archivo||'.xls';
in_file := Text_IO.Fopen(filename, 'w');
linebuf := '=TEXTO(1,"00000")';
Text_IO.put_Line(in_file, linebuf);
Text_IO.New_Line;
Text_IO.Fclose(in_file);
-- The path for Program Excel, would be due to obtain dynamically, with D2KWUTIL.
var_dir_dde := DDE.App_Begin('c:\program files\microsoft office\office\excel.exe
'||filename,DDE.App_Mode_Maximized); -- opens
DDE.App_Focus(var_dir_dde);
END;