#2361
|
||||
|
||||
![]() Quote:
![]() I checked settings.json and found the correct strings there. So, another 'problem' created by Excel's 'features'. There are many examples for unwanted 'conversion' etc. E.g. I want to open a csv file which contains Corona figures for age groups: 0-4 5-9 10-14 15-19 ... What does Excel do? 0-4 05. Sep Oct 14 15-19 ... Haven't found a way to turn these automatic 'helpers' off. If you format all columns to Text, Excel won't remember... Same with the tsv settings file, created by mgpai's script: Doubleclicking for opening it in Excel results in corruption of some strings. So, you have to import it, select UTF-8,... Also haven't found a way to tell Excel that I want to open all files as UTF-8. Question 1: You seem to be pretty familiar with Excel, too. Any ideas, e.g. how to let Excel treat all *.txt, *.csv, *.tsv, ... as UTF-8? Question 2: If you format all columns to Text, Excel won't remember... Do you know how to tell Excel to use text formatting as default? This would solve some problems such as my age group example. Then I could open csv files from RKI using doubleclick instead of time consuming import of each and every file... Last edited by StefanM; 21.06.2022 at 11:50. |
#2362
|
||||
|
||||
![]() Quote:
![]() ![]() Please see: lukemiller.org/journal/2005/03/changing-default-text-import-origin.html smallbusiness.chron.com/open-utf8-excel-63726.html It seems Excel does support BOM, see superuser.com/questions/911369/excel-change-default-encoding-file-origin-of-text-import-wizard-to-utf-8-650 @mgpai: see stackoverflow.com/questions/4389005/how-to-add-a-utf-8-bom-in-java, just have to add the BOM character at the beginning of the string should do it, for example Quote:
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 21.06.2022 at 12:43. |
#2363
|
||||
|
||||
![]()
I'm sorry but I have not found a way to change/define the default formatter of new sheets.
__________________
JD-Dev & Server-Admin |
#2364
|
||||
|
||||
![]()
I googled already for ages...
But the BOM issue, I haven't found myself. Will check it out. Thanks a lot! EDIT: No, this doesn't help! As you still have to use import. What I want to do is open files in Excel with doubleclick without corrupting anything. The ultimate solution, however, would be to be able to configure Excel in such a way, that it uses certain start settings. E.g. I often use 'text to columns'. But it's a pain in the ass, that every time you start Excel, it is reset to it's default settings and it is enabled. Last edited by StefanM; 21.06.2022 at 12:49. |
#2365
|
||||
|
||||
![]()
have you tried to change default encoding via registry ?
__________________
JD-Dev & Server-Admin |
#2366
|
||||
|
||||
![]()
Yes, long time ago already. And in Win10 there is also an option to enable UTF-8 (still called experimental). Both won't help.
But I set Windows notepad to UTF-8 via Registry, also long time ago. That works. |
#2367
|
||||
|
||||
![]() Quote:
What excel version are you using? Just tested on Excel 16 on my college computer and UTF-8 was default encoding.
__________________
JD-Dev & Server-Admin |
#2368
|
||||
|
||||
![]() Quote:
I run Excel 2019. So, how did you test it: Did you open a csv or tsv file with UTF-8 encoding by doubleclicking on it and Excel displayed 'special' characters like this one '↓ At the bottom' correctly? I'm not talking about importing such a file, as I don't want to do that: Too many clicks:
PS Notes: answers.microsoft.com/en-us/msoffice/forum/all/how-to-set-excel-to-default-to-utf-8-when-opening/c05ac760-b9e8-4cad-b188-6c0b4d3d2926 superuser.com/questions/911369/excel-change-default-encoding-file-origin-of-text-import-wizard-to-utf-8-650 And also this is only about text import as explained in those 7 steps (click marathon) I tried to explain. Last edited by StefanM; 21.06.2022 at 21:22. Reason: PS Notes |
#2369
|
||||
|
||||
![]() Quote:
![]()
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 22.06.2022 at 10:48. |
#2370
|
||||
|
||||
![]() Quote:
I was looking for a solution in general, not only for JD issues. But never mind, I've been searching for ages and could not find solutions. But thanks for trying! I really appreciate this! |
#2371
|
|||
|
|||
![]()
Hello mgpai,
when I click "Toggle sound notification" ![]() the selected items are sent to history ("Move to history") suddenly ![]() Is there any way to correct that?
__________________
Aktuelles Windows |
#2372
|
||||
|
||||
![]()
Have you tried LibeOffice/other SpreadSheet Tools? Even maybe Online Services/Tools?
__________________
JD-Dev & Server-Admin |
#2373
|
||||
|
||||
![]()
Check your scripts in Eventscripter! They must check on action name!
__________________
JD-Dev & Server-Admin |
#2374
|
|||
|
|||
![]()
Sorry, what does that mean, what action name? Where is it? What do I have to do exactly?
__________________
Aktuelles Windows |
#2375
|
||||
|
||||
![]()
@Dockel: those are scripts in your Eventscripter. You have to check Settings->Eventscripter and search the script and make sure that it only runs on correct action name.
__________________
JD-Dev & Server-Admin |
#2376
|
|||
|
|||
![]()
Sorry, do not understand what / where the action is.
__________________
Aktuelles Windows |
#2377
|
||||
|
||||
![]()
@Dockel: those rightclick context menu items are scripts in your Settings->Eventscripter.
There you must have setup those on Tigger/Event "Downloadlist Contextmenu Button Pressed" then click on edit and make sure that the script does check for correct name, something like Quote:
__________________
JD-Dev & Server-Admin |
#2378
|
|||
|
|||
![]()
OK, I will try it. Thank you!
__________________
Aktuelles Windows |
#2379
|
|||
|
|||
![]() Quote:
Code:
/* Export settings Trigger : none */ var rows = []; var keys = []; var file = JD_HOME + "/settings.tsv"; var settings = callAPI("config", "list", ".+", true, true, true, true); settings.forEach(function(item) { var itemKeys = Object.keys(item); itemKeys.length > keys.length && (keys = itemKeys); }) keys = keys.concat(["modified", "comment"]); rows.push(keys.join("\t")); settings.forEach(function(item) { var obj = {}; var row = []; keys.forEach(function(key) { obj[key] = JSON.stringify(item[key]); }) obj.modified = obj.value == obj.defaultValue ? "\"Default\"" : "\"Custom\""; for (key in obj) { if (key == "value" || key == "defaultValue") { row.push(JSON.stringify(obj[key])); } else { row.push(obj[key]); } } rows.push(row.join("\t")) }) writeFile(file, rows.join("\n"), false); Code:
/* Import Settings Trigger: None */ var file = JD_HOME + "/settings.tsv"; var text = readFile(file).trim().split("\n"); var keys = text.shift().split("\t"); var settings = []; text.forEach(function(row) { var obj = {}; row.split("\t").forEach(function(item, index) { try { obj[keys[index]] = JSON.parse(item); } catch (e) { obj[keys[index]] = null; } }) settings.push(obj); }) settings.forEach(function(item) { item.value != null && callAPI("config", "set", item.interfaceName, item.storage, item.key, item.value); }) |
#2380
|
||||
|
||||
![]()
Hey, you really created a script to import settings!
And you also added the the CUSTOM/DEFAULT column! Thank you so much for all the hard work! Both scripts will really be very useful for me (and not only for me, I guess...)! Will test later and let you know about the result. You probably already read this!? One working way to use Excel for the job of viewing/editing settings.tsv without corruption. If you know a better way, please let me know. ![]() Last edited by StefanM; 26.06.2022 at 15:41. |
![]() |
Thread Tools | |
Display Modes | |
|
|