Bug Hunting Session
Bug 73552 - Set name of CSV import sheet to something friendly
Summary: Set name of CSV import sheet to something friendly
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:4.3.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2014-01-13 12:21 UTC by Michael Meeks
Modified: 2017-05-14 07:43 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Make default sheet name to CSVData on CSV import (663 bytes, patch)
2014-02-10 13:44 UTC, voilavoila28
Details
Make default sheet name to imported filename on CSV import (783 bytes, text/plain)
2014-02-10 20:11 UTC, voilavoila28
Details
Make default sheet name to imported filename on CSV import (779 bytes, patch)
2014-02-11 05:24 UTC, voilavoila28
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2014-01-13 12:21:35 UTC
When I import a CSV, it ends up in a sheet called 'Sheet1' - I'd love to have a different name eg. 'CSVData' or 'RawData' or somesuch by default, that would be more friendly.

Of course we'd then need to translate that - and then we'd need to validate that the translation contained a real sheet name; so a bit of a pain - at least initially though switching to 'CSVData' would be quite fun.

It seems likely that the CSV import filter is in:

sc/source/filter/orcus/orcusfiltersimpl.cxx (ScOrcusFiltersImpl::importCSV)

But it is possible that there is another CSV import filter somewhere; it'd be worth checking the data goes through that method in the debugger first.
Comment 1 Kohei Yoshida 2014-01-13 17:21:12 UTC
Actually that code path (ScOrcusFiltersImpl::importCSV) is used only when the orcus mode is enabled, which, unless you are a coder and know exactly what to do to enable that mode, is disabled by default.

The main part of the current CSV import code is in ScImportExport::ExtText2Doc() in sc/source/ui/docshell/impex.cxx.  IIRC, we don't really explicitly insert the first sheet instance, and CSV only uses the first sheet.  So, you may not find an explicit call to insert new sheet there.  You can probably just set the new name to the first sheet at appropriate point during import.
Comment 2 Jean-Baptiste Faure 2014-01-25 10:49:18 UTC
Good idea. Why not adding an option in the CSV import dialog allowing the user to choose between:
- using the name of the CSV file (not a good idea if you want to change the CSV file without changing the data processing made on the data in another sheet)
- using sheet1
- using something like CSVdata
- providing the sheet name he want.

Set to enhancement.

Best regards. JBF
Comment 3 voilavoila28 2014-02-10 13:44:12 UTC
Created attachment 93774 [details]
Make default sheet name to CSVData on CSV import
Comment 4 Urmas 2014-02-10 14:00:09 UTC
More friendly would be to act like the real software and set the sheet name to CSV filename.
Comment 5 voilavoila28 2014-02-10 20:11:14 UTC
Created attachment 93800 [details]
Make default sheet name to imported filename on CSV import
Comment 6 Kohei Yoshida 2014-02-10 20:51:19 UTC
(In reply to comment #5)
> Created attachment 93800 [details]
> Make default sheet name to imported filename on CSV import

Hi Roger,

Your patch seems to have been cut off on the right hand side.  Can you re-submit with your whole patch?  Thanks.
Comment 7 voilavoila28 2014-02-11 05:24:19 UTC
Created attachment 93826 [details]
Make default sheet name to imported filename on CSV import
Comment 8 voilavoila28 2014-02-11 05:26:55 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Created attachment 93800 [details]
> > Make default sheet name to imported filename on CSV import
> 
> Hi Roger,
> 
> Your patch seems to have been cut off on the right hand side.  Can you
> re-submit with your whole patch?  Thanks.

I have re-submited
Comment 9 Kohei Yoshida 2014-02-12 04:05:44 UTC
I saw your attempt to send license statement, but you put the whole statement in the subject line.

I'd like you to re-submit your license statement, with the statement in the email body (not in the subject line), with the subject line of "<your name> License statement".  Replace the "<your name>" part with your real name.

Here is a good example of what a license statement should look like.

http://lists.freedesktop.org/archives/libreoffice/2014-January/058712.html

Thanks.
Comment 10 voilavoila28 2014-02-13 07:17:25 UTC
(In reply to comment #9)
> I saw your attempt to send license statement, but you put the whole
> statement in the subject line.
> 
> I'd like you to re-submit your license statement, with the statement in the
> email body (not in the subject line), with the subject line of "<your name>
> License statement".  Replace the "<your name>" part with your real name.
> 
> Here is a good example of what a license statement should look like.
> 
> http://lists.freedesktop.org/archives/libreoffice/2014-January/058712.html
> 
> Thanks.

i have re-submitted mail for license statement
Comment 11 voilavoila28 2014-02-13 13:38:45 UTC
(In reply to comment #9)
> I saw your attempt to send license statement, but you put the whole
> statement in the subject line.
> 
> I'd like you to re-submit your license statement, with the statement in the
> email body (not in the subject line), with the subject line of "<your name>
> License statement".  Replace the "<your name>" part with your real name.
> 
> Here is a good example of what a license statement should look like.
> 
> http://lists.freedesktop.org/archives/libreoffice/2014-January/058712.html
> 
> Thanks.

my email about license statement requires moderator's approval. Please look into it.
Comment 12 Commit Notification 2014-04-03 10:17:56 UTC
Aditya Kale committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a4f09f8c2ef3ae82b86d1b4f0c6c90d1a61614fa

fdo#73552 - Set name of CSV import sheet to something friendly



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 valentin 2014-12-02 18:29:15 UTC
This patch has broken my sheet and made it unuseable because now is not practicable to modify my links to the CSV data files without renaming them beforehand or modyfing every reference

Therefore I would be glad if either this patch is removed or modified in a way which would allow a deactivation from within the program.

Which  Jean-Baptiste Faure  already stated in his comment:

- using the name of the CSV file (not a good idea if you want to change the CSV file without changing the data processing made on the data in another sheet)
Comment 14 Michael Meeks 2014-12-03 10:23:51 UTC
I tend to agree that a well defined name; eg. 'RawData' would be rather better here, certainly for automation =)
Comment 15 Robinson Tryon (qubit) 2015-12-14 06:34:31 UTC Comment hidden (obsolete)
Comment 16 Robinson Tryon (qubit) 2016-02-18 14:51:43 UTC Comment hidden (obsolete)
Comment 17 jani 2016-04-18 07:26:15 UTC
A polite ping, still working on this issue?
Comment 18 jani 2016-05-19 06:03:12 UTC
Unassigning, due to lack of work.

Remark if you want to continue working on the issue, please assign yourself again.
Comment 19 jani 2016-05-23 06:39:13 UTC
Changing status to ASSIGNED
Comment 20 Eike Rathke 2016-05-23 11:24:58 UTC
Broken predictable external references are tracked with bug 86282