Skip to main content
Participant
December 11, 2007
Question

Data Sets in Photoshop CS2

  • December 11, 2007
  • 17 replies
  • 46989 views
I'm trying to learn about scripting in Photoshop CS2. By starting, I just want to import variable data into Photoshop, following the help instructions, however am having heaps of issues.

I'm using the Image > Variables > Data Sets > Import option.

My data looks like this..

Variable1
Ben
David
James
Mark

but when I try to import the text file, I get this error message...

"Could not parse the file contents as a data set. There were too many variable names in the first line of the text file."

Can anyone please tell me what I'm doing wrong?

Thanks
This topic has been closed for replies.

17 replies

Participating Frequently
April 19, 2023

I know it's an old thread but I just want to provide some information for upcomer.

You shouldn't have more variables in csv file than in Photoshop. So you should clean your csv before import.

Save csv file with comma as the separator. 

Don't put csv files in a non-English directory or network storage.

Don't have any other symbol in the first line except the comma.

abhij77885455
Participant
August 8, 2018

"could not parse file contain as a data set .data set 11 was incomplete "

what t is the problem

Kukurykus
Legend
February 4, 2018

I spent 3 hours using above examples plus those from other theards like: Data Sets and still can't use a .txt / .csv file with more than only one column ie. variable name in first line, while values in next line(s). For ex. this one column sample works:

Numbers

one

two

three

but this doesn't work:

Numbers, Names

one, lorem

two, ipsum

three, dolor

when I use tabulator instead of coma it doesn't work too:

Numbers     Names

one     lorem

two     ipsum

three     dolor

Other combinations with tab / comma delimiters don't work too whatever used in .txt / .csv file (obviously ASCII encoding)

I used all available examples (they work for everyone), watched videos and was on Adobe tutorial. ...let's focus just on this:

a, b

1, 2

or

a     b

1     2

Can someone tell me what I'm doing wrong? Here are step by step how I tried it to make it done from beginning to the end:

  • I created new photoshop document / opened already existing
  • I added normal / text layer (as it doesn't work for background)
  • In Variable Type panel of Image/Variables/Define I selected 'Layer 1', filled 'Visibility' box, then in 'Name' field I typed: a
  • I switched to 'Data Sets' and clicked 'Import' button. Used 'Automatic' Encoding, left unfilled available boxes (however tried combinations with filled too), selected file (.txt / .csv) and after clicking 'OK' button each time was getting alert: "Could not parse the file contents as a data sets. There were too many variable names in the first line of the text line"

If I use a file with just one column, so variable and value(s) it works, but why I can't use more than one variable / values though EVERYONE with given solution can. What I am doing wrong?! (I can script it but want to understand what's bad)

I'm using CS6 Extended on Windows 10 if that changes anything. Can someone send me .psd and .txt / .csv file they works?

Stephen Marsh
Community Expert
Community Expert
February 5, 2018
Kukurykus
Legend
February 5, 2018

For some reason I thought that 'Create a new data sets based on current sets' in 'Data Sets' should be clicked after importing data from file. It's why it didn't work. But I'm not sure why I missed it? Maybe that was so obvious no one clearly stated it

Participant
February 4, 2018

Plz follow this link Photoshop error "could not parse the file contents as a data set." - YouTube

and see the video. I hope that your solution is available here. Thank You.

EDIT [video has bad audio interference - moderator]

abhij77885455
Participant
August 8, 2018

Namastye

mera deta set file load karne par problem de rahahai

erre aa raha hai "could not purse file contain as a  data set .data set 11 was incomplete "

krupaya maragdarshan kijiye

dhanyawad

Drew4star
Participant
December 14, 2014

Hi All,

I thought I'd throw my two cents in to this discussion. Hopefully it will help someone chasing some answers to the error you get when trying to parse the csv file into data sets.

After building a test excel sheet then saving as csv I tried to import this data set into photoshop and got this message. "Could not parse the file contents as a data set. There were too many variable names in the first line of the text file."

After opening this csv file in text edit, I discovered the data had included a couple of spaces (which to me looked like a double comma) at the end of each line.

               Title1,Title2,Title3,Title4,Title5, ,

This turned out to be an operator error, as I had applied the space bar in a couple of columns without realising.

Simply removing these, and/or make sure your "empty" cells are actually empty. Your raw data should end on the last input data and nothing more.

               Title1,Title2,Title3,Title4,Title5

I was able to import the data set without any errors.

Hope this helps?

Andrew.

Participant
January 31, 2016

I just messed around with this too.

Here was my problem & solution:

I had 3 layers with data (one variable field per layer), but in my spreadsheet / tab delimited file I had 6 columns of data.  I assumed that Photoshop would be able to look to the table and find the data related to that column (and ignore other columns).  I was wrong.  It appears you need to have the same number of columns in your data table as fields in your document.

Inspiring
December 4, 2017

Spot on Matdog123

The error is misleading. There are not 'too many' variables in the first row of the text file (or spreadsheet columns) per se. You can have lots of variables listed there.

What it means is that there are more variables listed in the text file relative to those present in the Photoshop file.

The relevant variable must be added to Photoshop layers and Image > Variables > Define, or deleted from the spreadsheet and text file to synchronise them.

Participant
May 27, 2008
Mary Jo:

A .csv file would look like this with the variable defined on the first line separated by commas, and subsequent lines containing the actual values, again separated by commas. Each line is completed with a carriage return (enter)not a comma.

FirstName, LastName, Employer
Steve, Jobs, Apple Computer
Bill, Gates, Microsoft Corporation
John, Doe, Some Company
Jane, Smith, ACME Printing

The file should be created in plain text, not rich text. Make sure your text editor is set up to format this way. Also, save the file with a .csv extension.

Hope this helps.
Participant
August 18, 2010

I had a similar error, using CS4.  Turns out Photoshop did not like me having an extra named column,  not used as a variable, which I had for my own record purposes.  Deleteing that solved the problem.

Participant
May 23, 2008
Hi everyone,
I am able to put variable text in my psd document by creating the data sets manually, but I still don't understand how to set it up as a .csv or .txt file.

Could someone show me how it actully looks with real names?

Thanks much,
Mary Jo
msajdowitz@yahoo.com
Participating Frequently
April 30, 2008
Like that way if you do it then certainly an error message will apper in the screen.Two points you have to keep in your mind..i.e you have to create the variable text within the image BEFORE trying to import the data and the second point is you can't have any commas following your last variable or data, otherwise photoshop will see it as another variable.

Martin Fowl
| inkjet
cartridge
| data recovery
| data recovery |
Participating Frequently
April 28, 2008
Participating Frequently
April 25, 2008
Like that way if you do it then certainly an error message will apper in the screen.Two points you have to keep in your mind..i.e you have to create the variable text within the image BEFORE trying to import the data and the second point is you can't have any commas following your last variable or data, otherwise photoshop will see it as another variable.

Martin Fowl