Extra " around string in exported data

Looks odd to me. May be bug, may be something which has no impact. Needed your views.

I exported Department’s data to get “Data Import Template” for Department Table. I noticed extra " for ID/name column, i.e. Account is appearing as "Accounts", in excel, and in csv these values are enclosed with three double quote like:

"""Accounts ""","Accounts"

Excel file looks like:

DocType: Department
Column Labels: ID Department
Column Name: name department_name
"All Departments" All Departments
"Accounts" Accounts
"Customer Service" Customer Service

Is it expected behaviour, or somewhere something went wrong?

However if I “Download template” from “data-import”, then things are there as expected.

I think this is an issue with Excel settings.
When I open an exported Department record, I don’t see any quotes
for the ID.

Screenshot 2024-06-16 at 9.58.09 AM

You seem to be on MAC.

I had the same problem as hsrai with Excel on Windows.
It even might depend on which version, of either one.

Excel seems to expect semicolons “;” as field separator. frappe exports commas “,”.
Excel has different facilities (depending on version) to still import comma-d CSV.

But the issue hsrai raises is real, I observed the same.
It’s already in the exported CSV as he sais.

1 Like

I don’t use MS Excel on MS Windows, so these things are not in picture.

I used LibreOffice Calc on Linux.

Rather none of above is in the picture.

You can open exporter .csv in any text editor.

Could you reimport the templates with expected results?

I’m asking because I had and still have crazy problems with the import functionality (after getting the template) and didn’t find the solution so far.
Basically it didn’t work at all, with many permutations and variations of presenting the data to be imported I only got import errors without finding any way out.

When exporting a template and reimporting the file as is, it should accept the import as such, but reject every single line as duplicate, right? That would be easy and clear and you could work from there. But this is not what happened.

I tried too many things to expose the whole thing here ATM, so I’d rather like to know if other people experienced this in a similar way.
I’m also not giving up, and will find the solution in the code, and/or import my data in another way, but the experienced non-functionality of a simple import looks very odd to me.

Is anybody using the import function at all? Is it properly tested?
Is it tested in a localized form?
(I’m using certain german localizations, but not on all instances.)

Or how is everybody importing data, for real?

I’m aware of REST API (which I got to work) and scripting, but that’s not the point I’m trying to make here. The import functionality looks good and would be useful, if only it worked as advertised. But in my case, it didn’t, and for no understandable reason.

I’m on a recent v15, and the problem persists for almost year or so already.

I’m finding this so odd because anyone experiencing this at the start of an evaluation will immediately be put off, and I’m not a newbie at programming, python, data formats, so I really wonder what’s going on.

I also confirm that with the bank account statement import, the import worked flawlessly and at the first try.
Why is the other doctype’s importer so different?

Important work fine.

If you import exported data as new data then duplicate error is expected.

If you explain your steps and also give the demo exported file and file used to import, then users here may be able to suggest something, or even, I am sure, you will figure out the issue yourself and thus solution as well.

Ok, great! Thank you for this data point from your experience.

I’ll figure it out, sure. It might also be a misunderstanding, or a localization error, or maybe several stacked problems.

One thing I noticed: In the import template it says to “not touch the headings”. But there are the headings of the columns, and the headings on top of all these headings. So which headings does this refer to?

Of course, I tried many things and also deleted headings after they were flagged by the import tool as an error. Apparently it tried to import the warning and explanation messages. As a UX, this makes no sense. But who knows in which transition phase of the tool’s evolution I caught that one. It could have been a partial localization, where the tool doesn’t recognize a localized explanation as such.

We’ll see how this resolves.