Recent

Author Topic: Without absolute path, and set author [SOLVED]  (Read 4349 times)

totya

  • Hero Member
  • *****
  • Posts: 720
Re: Without absolute path, and set author [SOLVED]
« Reply #15 on: July 30, 2020, 10:35:26 am »
I only added Subject because it exists in both xlsx and ods. The others are an Excel-only thing. But if you'd ever need something like "Manager" in the metadata you can now define custom fields

Thank you master! :)

Unfortunatelly these custom fields not readable by excel, only with fps, but I think might be useful these hidden properties. ;)

I noticed one small bug, Keywords separated with "," excel: "First,Second,Third"  but the comments merged without any separator: excel: "FirstSecondThird'.

excel corexml:
Code: Pascal  [Select][+][-]
  1. <dc:description>First_x000d_Second_x000d_Third</dc:description>

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Without absolute path, and set author [SOLVED]
« Reply #16 on: July 30, 2020, 11:46:33 am »
Unfortunatelly these custom fields not readable by excel, only with fps, but I think might be useful these hidden properties. ;)
In Excel 2016 they are readable, and I think that they are also in your Excel 2013 because similar items in the xml files exist already in the pre-xlsx XML format of 2003.

The problem is that Microsoft has an awful user interface here. In the metadata screen of my version there is a button "Properties" with a dropdown menu. After clicking on the only item of that dropdown a dialog appears in which the custom properties can be viewed and modified. See my screenshots of the file created by the meta data demo program of fpspreadsheet (they are in German, but I hope you can locate the controls nevertheless). Note that fpspreadsheet stores custom properties only as strings while Excel (as well as LO Calc) allows to select a data type for each. But I think this would make things too much complicated for such a rarely used feature.

I noticed one small bug, Keywords separated with "," excel: "First,Second,Third"  but the comments merged without any separator: excel: "FirstSecondThird'.

excel corexml:
Code: Pascal  [Select][+][-]
  1. <dc:description>First_x000d_Second_x000d_Third</dc:description>
The "_x000d" is the replacement of a line feed used by Excel here. Again, when you look at the comments in the "hidden" dialog mentioned above you will see the line feeds. It is hard to understand that a company like Microsoft does not care for a better user inferface here considering the age of "Excel". Are we two the only persons seeing this?

BTW, you are talking of "keywords" here but your input shows up in the "description" field. "True" keywords are entered in the Excel interface in the box "keywords" as a comma-separated list. My field "description" (named after the LO Calc field) gets what is input in the "comments" box.

Another BTW: I see in the "excel_metadata.png" screenshot that there is an option to add another author ("Autor hinzufügen"). FPSpreadsheet ATM supports only a single author. Do you think it is necessary provide this option, too?

totya

  • Hero Member
  • *****
  • Posts: 720
Re: Without absolute path, and set author [SOLVED]
« Reply #17 on: July 30, 2020, 06:23:49 pm »
Hi master!

Thank you for your detailed asnwer!

As I see we speak two different things.

I speak the main (most important) document properties, se pictures. As I wrote, I can't modify these (wich fps uninmplemented) with Metadata.Custom, for example: subject (tárgy).

These "important" document properties available in two files, app.xml, and core.xml.

I attach these files too. Between "#" the hungarian keyword. Forum don't allow upload xml file, so I upload these as zip.

You speak the information/properties/special properties/custom tab. (in Office 2013). I think your speak this.

The more thing I will answer later! Now I'm busy...

Thank you for your job!


wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Without absolute path, and set author [SOLVED]
« Reply #18 on: July 30, 2020, 10:29:19 pm »
This page "Document properties", or similar, is not displayed in my Excel 2016. It seems to be integrated into the dialog opening with "Extended properties".

What a mess! Why do they need three files to store simple meta data: core.xml, app.xml, custom.xml?

Excuse me, but I am not really motivated to spend much more work in this.
« Last Edit: July 30, 2020, 11:06:14 pm by wp »

totya

  • Hero Member
  • *****
  • Posts: 720
Re: Without absolute path, and set author [SOLVED]
« Reply #19 on: July 30, 2020, 10:33:39 pm »
Your job is much more than I excepted, thank you master! :) I can set author to the xlsx file, and much more...

At the weekend I hope I have more time to answer to you as I promise.

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Without absolute path, and set author [SOLVED]
« Reply #20 on: July 31, 2020, 12:18:03 am »
I couldn't stop and added support for multiple authors. They are stored in the StringList Metadata.Authors where you can use the method Add() to add multiple authors. The property CreatedBy still exists, it lists a semi-colon separated list of all authors (except for the last modifying one which is still separate as LastModifiedBy).

It is strange that Microsoft uses a semi-colon separated list here, because normally their list separator is a comma at the file level. In fact, the keywords are separated like that. On my German version of Excel, on the other hand, the semi-colon is the standard list-separator.

Please open the metadata page in Excel and add a second author (using the "Add author" button). After saving extract the core.xml file from the Excel-zip and find the node <dc:creator>. Which list separator do they use here between the two authors? Is this the same character that FPC displays in this short code?
Code: Pascal  [Select][+][-]
  1. program Project1;
  2. uses SysUtils;
  3. begin
  4.   WriteLn(DefaultFormatSettings.ListSeparator);
  5.   ReadLn;
  6. end.

totya

  • Hero Member
  • *****
  • Posts: 720
Re: Without absolute path, and set author [SOLVED]
« Reply #21 on: July 31, 2020, 12:21:20 pm »
I couldn't stop and added support for multiple authors.

Hi master!

I just sit of the front of my computer at the moment, so sorry for the delay!

MS Office 2013 Hungarian core.xml file:

Quote
<dc:creator>First Author;Second Author;Third Author</dc:creator>

Your code result:

Quote
;

So same as: ";"

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Without absolute path, and set author [SOLVED]
« Reply #22 on: July 31, 2020, 12:30:47 pm »
Thank you. That's same situation as mine. Maybe somebody having an English Excel in which formula arguments must be separated by comma (instead of semi-colon) should repeat this experiment.

totya

  • Hero Member
  • *****
  • Posts: 720
Re: Without absolute path, and set author [SOLVED]
« Reply #23 on: July 31, 2020, 12:58:55 pm »
Thank you. That's same situation as mine. Maybe somebody having an English Excel in which formula arguments must be separated by comma (instead of semi-colon) should repeat this experiment.

Hi!

For example in my area and language settings (Win7 control panel) - see attached picture (list separator).

If I change to English, I got ","

But... if area and language settings stay English, and I start Excel, create empty worksheet, set authors, then savefile, the contain of the core.xml:

Quote
<dc:creator>First Author;Second Author;Third Author</dc:creator>

Same as... I think the "internal" sperator independent from the country list separator. Someone should to try with English version of Excel...

totya

  • Hero Member
  • *****
  • Posts: 720
Re: Without absolute path, and set author [SOLVED]
« Reply #24 on: August 02, 2020, 08:18:32 pm »
Hi master!

Perhaps my friend can create multiple author xlsx file with English version of Excel on monday. I hope.

Edit.: Today is bankholidays, and he forget it... he looks later...
« Last Edit: August 03, 2020, 04:59:43 pm by totya »

totya

  • Hero Member
  • *****
  • Posts: 720
Re: Without absolute path, and set author [SOLVED]
« Reply #25 on: August 05, 2020, 05:36:24 pm »
Hi master!

English Excel 2010 core.xml:

Quote
<dc:creator>deletedprivatedata;First Author;Second Author;Third Author</dc:creator>

So stay: ;

Excel version (2010):

Quote
<AppVersion>14.0300</AppVersion>

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Without absolute path, and set author [SOLVED]
« Reply #26 on: August 05, 2020, 06:12:05 pm »
OK then let's keep it as it is. Hopefully they do not change their mind in some future version.

 

TinyPortal © 2005-2018