When trying to load csv file data into Scribus it only takes the data of the last row.
I'm using ScribusGenerator.py by Ekkehard Will and my best guess is that the cause of the problem is somewhere in this part of the code:
def replaceVariablesWithCsvData(self, headerRow, row, lines): # lines as list of strings
result = ''
for line in lines:
i = 0
for cell in row:
tmp = ('%VAR_' + headerRow[i] + '%')
line = line.replace(tmp, cell) # string.replace(old, new)
i = i + 1
result = result + line
return result
def getCsvData(self, csvfile):
Read CSV file and return 2-dimensional list containing the data
reader = csv.reader(file(csvfile))
result = []
for row in reader:
rowlist = []
for col in row:
rowlist.append(col)
result.append(rowlist)
return result