importData question

importData question - problems with smath syntax - Сообщения

#1 Опубликовано: 26.02.2019 06:03:36
RegCurry

RegCurry

0 сообщений из 57 понравились пользователям.

Группа: User

Sorry to keep asking these syntax questions, but I can't seem to import csv data into an Smath worksheet.

See attached image.

SMATH INPUT DATA ATTEMPT.JPG



Thanks for your continued help.
Reg Curry
#2 Опубликовано: 26.02.2019 07:06:11
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

Hello [userlink]Regulation[/userlink],

this screenshots alone can't say much about the problem; the error message, the content of HEMP_FIELD, the content of the data file are all unknown to us. Usually the best way to have fast help is to attach the involved files, better if simplified as mush as it is in your possibilities, as well as the screenshot.

Back to the main question, you can check if my recent answer here might help you.


P.S. please don't write "all caps" titles, thank you
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Опубликовано: 26.02.2019 07:25:39
RegCurry

RegCurry

0 сообщений из 57 понравились пользователям.

Группа: User

Thanks Davide,

Here is an update with the actual .sm file and the actual .txt file which DOES INDEED work. I left out the quotes; however, the .csv file still does not work even with quotes in importData(1). Perhaps Smath does not like comma delimited data??????

Файл не найден.Файл не найден.

This forum will not allow me to attach .csv files.

I would like to have the simplest import function without having to specify paths and sheet number. I notice when I copy a path from Windows 7 Professional 64 bit, it will not paste into Smath locations. That means a lot of unnecessary typing. Perhaps this could be corrected in future releases.

Thanks again,
Reg Curry
#4 Опубликовано: 26.02.2019 07:44:34
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

Wrote

Perhaps Smath does not like comma delimited data??????


As I've stated in the linked post, importData is a generic purpose import utility. If you use the 1-argument version, only files with period as decimal separator and tabulation/whitespace as columns separators are imported correctly. To read CSV you have to use the 9-arguments function and specify comma as column delimiter.

Wrote

This forum will not allow me to attach .csv files.


Zip whatever is not allowed to be attached directly (zip, rar, 7z, ...), so we'll check it.

Wrote

I would like to have the simplest import function without having to specify paths and sheet number.


I might introduce an importData.CSV in CustomFunctions; it wasn't introduced in first instance because there already was the built-in importData(9)

Wrote

I notice when I copy a path from Windows 7 Professional 64 bit, it will not paste into Smath locations.


I usually prefer relative locations (relative to the worksheet). About absolute paths, I can copy-paste paths in math strings without troubles (create one with double quotes in a math placeholder, then paste the path), let me know if and how you experience issues.

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений