inport online excel (.xls) file in SAS - import

How would you import an online xls file in SAS ?
I tried
proc import
out=test
datafile='//statbel.fgov.be/fr/binaries/311111Population%20de%20droit%201990-2011_fr_tcm326-55771.xls'
dbms=excel
replace;
run;quit;
ERROR: DBMS type EXCEL not valid for import.
I also tried DBMS=xls and DBMS=XLSX
SAS 9.3 in SAS enterprise guide 5.1
Operating System: WX64_SV .
---Base SAS Software
---SAS/STAT
---SAS/GRAPH
---SAS/ETS
---SAS/CONNECT
---SAS/IntrNet
---SAS Integration Technologies
---SAS/ACCESS Interface to ODBC
---SAS Workspace Server for Local Access
---SAS Workspace Server for Enterprise Access
---DataFlux Trans DB Driver
---SAS Framework Data Server
---SAS Add-in for Microsoft Excel
---SAS Add-in for Microsoft Outlook
---SAS Add-in for Microsoft PowerPoint
---SAS Add-in for Microsoft Word

You don't license SAS/ACCESS to PC FILES, so you can't use PROC IMPORT with DBMS=EXCEL. You will need to import it using point-and-click in Enterprise Guide, license the software, or download it and save it as CSV or similar format (or obtain it in a different format).

The answer is given by Chris#SAS in this forum:
https://communities.sas.com/message/194367#194367
1 use SAS to copy the file from the web to a path on your SAS Workspace
2 use SAS Enterprise Guide and the Import Data task to create the SAS data set.

Related

SPSS .sav file not reading into SAS

Attached here is my very simple code to read in .sav files into SAS for analysis.
PROC IMPORT
DATAFILE='C:\Users\Desktop\Iliu_SAS_Files_Relocated\0310_HPV-Boys\SPSS Files\BoyVacuptake.sav'
OUT=work.BoyVacuptake
DBMS=SAV REPLACE;
The error code that I keep getting is:
ERROR: DBMS type SAV not valid for import.
I am running SAS 9.4 which should allow me to import/export SPSS files using the DBMS=SAV option. Does anyone know why I may be getting this error? Or any fixes?
I've tried using the DBMS=SPSS option as well, same error. Probably going to try to just read everything into R and export into SAS from there. Need to convert everything to a .sas7bdat file. The .sav files are from an external partner, I do not have access to SPSS to just save the data in a different format.
First make sure you have SAS/Access to PC Files licensed and installed. Run PROC SETINIT to see what you have licensed.
Second try using SPSS as the DBMS= setting as this documentation page says:
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acpcref/n1h6b01uh0dm2yn1fpq85gjgwcfs.htm
Importing and Exporting SPSS Files
SPSS Files (DBMS=SPSS)
The IMPORT and EXPORT procedures support two DBMS= identifiers for SPSS .sav files. The DBMS=SPSS specification uses SPSS file formats to access data in SPSS .sav files on UNIX and Microsoft Windows operating platforms.

Trying to import CSV file to Analysis Services Tabular project

I have Microsoft Office Professional Plus 2019 and Access database engine both 64-bit installed on my machine and was trying to import a CSV file to Analysis Services Tabular project. However keep getting the error message shown below.
"Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: The Microsoft Access database engine cannot open or write to the file 'BatchInfo.csv'. It is already opened exclusively by another user, or you need permission to view and write its data.; 3051."
Any help is appreciated please.
Either you or someone else has the file open. Sometimes you have to completely close out of the program that created the file, or the last program used to read, write, or save the file.
If it's something on your computer, you may be able to find what has it opened with the Process Explorer tool. Install it, and then use Find > Find Handle or DLL... and search on "BatchInfo.csv".

Migrate model from a VS 2015 to VS 2010

I initially created the Codefluent project for Visual Studio 2015 but now need to drop it down to Visual Studio 2010. The documentation states that an existing database or model can be imported. It's not clear what is meant by importing an existing model. I assumed the import wizard would give me an option to specify the .cfp file (which is essentialy my model) that I created in Visual Studio 2015. I don't see any such option. The only import option I see is to specify the connection string to the database and then specify the tables.
Questions:
Is there a way to do an import by specifying the .cfp instead of the database and tables to be imported?
If there is no import option on the .cfp file, I'll probably manually copy and paste the contents of the .cfp from the VS2015 project into .cfp file of the VS2010 project. Does that seem like a good solution?

JasperSoft Studio 5.6.1 Excel Macro Merge Template

I am attempting to merge an excel exported file from Jaspersoft Studio 5.6.1 with a macro-enabled excel file. However, when I use the "Add JasperReports Server Resource", other file types are not permitted. What is the proper procedure for uploading macro.xls?
Is the macro file needed in the local studio folder structure and get compiled together with the .jrxml OR does it exist on the JasperServer as a resource that is retrieved when the report is executed? This is a requirement for us in order to produce a file with grouped/collapsed columns which is not supported by the native API's.
When I place the macro file on the JasperReports Server and provide the path in the properties of the report, I receive an error message:
net.sf.jasperreports.engine.JRException: Input stream not found at : /Folder/Resources/macro.xlt

Import excel spreadsheet into Oracle using sdcli command line tool

I'm attempting to into import oracle 11gR2 using the command line tool for SqlDeveloper 4.0. The ultimate reason is we are attempting to import a lot of freetext fields that need to preserve the exact formatting. CR LF, etc for legal reasons. End users need to edit these in Excel.
SQLLoader baulks at the CR LF's, You can achieve this in SqlDeveloper by switching the formatting to UTF-8 for import / export. We are now trying to build up some scripts after discovering how to do this in the command line runtime sdcli64... BUT there doesn't appear to be an option to import from a flat file or .xlsx in that utility??
Any pointers or are we missing an obvious parameter?
(we are using the latest version of SqlDeveloper we can find, 4.03)
Cheers,
Chris
New version of Oracle developer 4.1 was released as an Early adopter today. You can run the sdcli or sdcli64 command line version with the new parameters. This will import excel files as possible in the sqlDeveloper GUI and it will preserve the formatting using the new [-utility] switch.
You can then use the scripting tool/method of choice to build scripts to do all files in a directory, etc.
With new SQL Developer 4.1 you may import XLSX file (and other formats too) via command line:
Use sdcli utility import.
You will need a config XML file. To create one, start the import in the UI, configure the columns, etc, and at the last step click the button 'Save State'. It will create an XML file you may re-use in command line.