BookmarkSubscribeRSS Feed
pp2014
Fluorite | Level 6

I have .csv file which I want to save as .xlsx file. I want to keep the original .csv file as it is but kind of copy .csv into .xlsx.  I am using the following. It copies .csv file into .xlsx but I cannot open that .xlsx file. options xsync noxwait; x %sysfunc(quote(copy "c:\temp\test123.csv" "c:\temp\test123.xlsx")) ; Is there a way I can copy .csv into .xlsx file using sas? Thanks

2 REPLIES 2
SASKiwi
PROC Star

I don't see the point of simply copying a CSV and renaming it with an XLSX extension. The copy is still a CSV file even though the extension indicates it is an XML-type spreadsheet.

Is it your intention to create a genuine XLSX spreadsheet copy of the CSV? If so you can do that in a variety of ways from SAS including PROC EXPORT and ODS ExcelXP tagset. 

Cynthia_sas
SAS Super FREQ

Hi:

  A minor correction. ODS and TAGSETS.EXCELXP do not create a "genuine" XLSX spreadsheet. TAGSETS.EXCELXP creates Spreadsheet Markup Language XML (designed for Office 2003), which was the XML precursor to the XLSX format. PROC EXPORT can create true XLSX files. There is a new ODS destination on the horizon that will also create XLSX files, but it is still pre-production, as described here: http://blogs.sas.com/content/sasdummy/2014/09/21/ods-excel-and-proc-export-xlsx/

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2913 views
  • 0 likes
  • 3 in conversation