Recent

Author Topic: Access to defined names in an excel workbook  (Read 1394 times)

Jiří Huňáček

  • New Member
  • *
  • Posts: 19
Access to defined names in an excel workbook
« on: July 21, 2024, 07:00:30 pm »
Hello,

I can't find a solution for my problem on the internet.

So far I can access individual cells through the FPSspreadsheet library, but I would need to find a way to access the defined names in the excel workbook - creating a list for selection and then finding out the specific range of the selected name for data import.

I am grateful for any advice

George
Best regards / mit freundlichen Grüßen / s pozdravem
Jiří Huňáček (George)

wp

  • Hero Member
  • *****
  • Posts: 12280
Re: Access to defined names in an excel workbook
« Reply #1 on: July 21, 2024, 07:08:57 pm »
Sorry, but defined names have not yet been implemented in fpspreadsheet.
« Last Edit: July 21, 2024, 10:42:24 pm by wp »

Jiří Huňáček

  • New Member
  • *
  • Posts: 19
Re: Access to defined names in an excel workbook
« Reply #2 on: July 21, 2024, 08:11:57 pm »
Yes, I know that too, but I'm wondering if anyone knows of any other solution, perhaps some other library.
Best regards / mit freundlichen Grüßen / s pozdravem
Jiří Huňáček (George)

zeljko

  • Hero Member
  • *****
  • Posts: 1637
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Access to defined names in an excel workbook
« Reply #3 on: July 21, 2024, 10:17:17 pm »
Maybe commercial TMS FlexCell ?

wp

  • Hero Member
  • *****
  • Posts: 12280
Re: Access to defined names in an excel workbook
« Reply #4 on: July 22, 2024, 12:33:05 am »
Sorry, but defined names have not yet been implemented in fpspreadsheet.
Had a look into the xml of an xlsx file with named cells - looks easy. Please give me some time.

wp

  • Hero Member
  • *****
  • Posts: 12280
Re: Access to defined names in an excel workbook
« Reply #5 on: July 25, 2024, 11:39:50 pm »
Implemented defined names for the xlsx and ods file formats. They can be used in formulas, as well. See the demo projects in the folder examples/other/defined_names.

Note: this code is not yet in the OPM version, you must use the ccr version to get it (use svn or download the zipped snapshot from https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/fpspreadsheet/.

veb86

  • Jr. Member
  • **
  • Posts: 60
Re: Access to defined names in an excel workbook
« Reply #6 on: July 29, 2024, 09:18:37 am »
Cool. Very cool. A necessary feature!
Sorry, please. Look, maybe it's not hard to add a list of validations. Or conditional formatting, so that a cell can change color depending on the value inside this or another cell. This would help to liven up the resulting file.

wp

  • Hero Member
  • *****
  • Posts: 12280
Re: Access to defined names in an excel workbook
« Reply #7 on: July 29, 2024, 11:12:22 am »
I want to complete defined names first, there are still some issues. Conditional formatting has already been added some time ago (as I see now it is missing in the documentation so far, just like chart support).

Jiří Huňáček

  • New Member
  • *
  • Posts: 19
Re: Access to defined names in an excel workbook
« Reply #8 on: September 01, 2024, 11:37:18 am »
I appreciate the addition of Define Names. I downloaded the zipped snapshot today but it doesn't load the define names. So, maybe there's a bug in the code that I'm not seeing. I am attaching a test project and an XLSX file.

I'm using MS Excel 365.
« Last Edit: September 01, 2024, 11:38:50 am by Jiří Huňáček »
Best regards / mit freundlichen Grüßen / s pozdravem
Jiří Huňáček (George)

 

TinyPortal © 2005-2018