Message Boards Message Boards

0
|
7504 Views
|
5 Replies
|
5 Total Likes
View groups...
Share
Share this post:

A tired topic: importing from Excel into Mathematica

Posted 4 years ago

I've spent some time attempting to import data from Excel, the sheet of data I want to import is 72 rows x 30 columns but it seems no matter what i try only two columns are copied in a readable format. Data import of large arrays is very easy in Mathcad, Matlab, etc., why so difficult in Mathematica?

If there is a work around for this kind of situation I'm all ears.

POSTED BY: Gerald Proteau
5 Replies
Posted 4 years ago

Many thanks, I'm only a few days with this program and find the syntax unlike anything I've used in the past, but its progress.

POSTED BY: Gerald Proteau

I can easily import the XLSX file

data= Import["c:\Users\lvveen\Downloads\ssc.xlsx", {"Data", "Sheet1", 1 ;; 72, 1 ;; 30}]; % // Dimensions

Gives {72, 30}

data[[All, 2]] // Total

gives -66552.4

POSTED BY: l van Veen
Posted 4 years ago

Hi Gerald,

Try this to Import 72 rows and 30 columns.

data = Import["~/Downloads/ssc.xlsx", {"Data", 1, 1 ;; 72, 1 ;; 30}];
Dimensions@data
(* {72, 30} *)
POSTED BY: Rohit Namjoshi
Posted 4 years ago

I've added the files I'm working with. The excel file contains data for overhead cables, one cable per row.
G

POSTED BY: Gerald Proteau
Posted 4 years ago

I import excel files (xlsx) and csv files frequently and encounter no problem. Would you mind attach your file and your code for import? so I can have a check.

POSTED BY: Jason Zhao
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract