Error while opening output from excel

Reply
Frequent Contributor
Posts: 87

Error while opening output from excel

I use Microsoft Excel 97-2003 Worksheet (.XLS) opens with  (LibreOffice Calc) from my system

i am using following code to generate output in excel

/*Defining Styles of the report in pdf*/
proc template;
define style Styles.newpdf;
  parent = Styles.Printer;
  STYLE SystemTitle /
   FONT_FACE = "Zurich bt,Arial,Helvetica "
   FONT_SIZE = 11;
  STYLE data /
   FONT_FACE = "zurich bt,Arial,Helvetica"
   FONT_SIZE = 11pt;
  STYLE usertext /
   FONT_FACE = "zurich bt,Arial,Helvetica"
   FONT_SIZE = 11pt;
  STYLE Header /
   FONT_FACE = "zurich bt,Arial,Helvetica"
   FONT_SIZE =11pt;
  STYLE systemFooter /
   FONT_FACE = "Zurich bt,Arial,Helvetica "
   FONT_SIZE = 11pt;
end;
run;

/*Defining Styles of the report to EXCEL*/
proc template;
define tagset tagsets.width;
  parent=tagsets.htmlcss;
  define event data;
   put "<td";
   trigger pre_post;
   putq " class=" HTMLCLASS;
   trigger align;
   trigger style_inline;
   trigger rowcol;
   put ' style=' htmlstyle;
   put ">";
   put "<pre>" / if exist( asis );
   put VALUE;
   finish:
    trigger pre_post;
   put "</pre>" / if exist( asis );
   put "</td>" NL;
  end;
end;
run;


ods markup tagset=tagsets.width path='path' file="sample.XLS" stylesheet='css.css';

ods pdf file="path/sample.pdf" startpage=no style=styles.newpdf;
title1 h=5 'Class';
ods escapechar='^';
/*Generating report using proc report*/
proc report data=sashelp.class nowd split='~';
run;
ods pdf close;

ods markup close;

previous it use to open in LibreOffice Calc now it has been updated  we are unable to open this excel files

is there any other method to generate excel that opens in liber office

Kindly find the attached error saved in word

Attachment
Super User
Posts: 11,343

Re: Error while opening output from excel

The output generated should actually be html of some flavor. You may be running into some version of the expected file format (xls from file name) doesn't match the actual fomat (html) and the software complaining.

I would first try renaming the the output to an HTM or HTML extension and see if opening the file works.

Ask a Question
Discussion stats
  • 1 reply
  • 268 views
  • 0 likes
  • 2 in conversation