Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default How to parse UDF arguments? (separators are localized)

We have designed an add-in for Excel 2003 in C# that need to parse the
arguments of an Excel UDF function (the content of the cell being
retrieved as text).

So far, we were just using an ad-hoc parser, but it fails within
localized version of Excel that do not use the comma as argument
separator.

What it the "safe" way to parse Excel function arguments? Is there any
way to know what is the separator character that should be used?

Thanks in advance,
Joannès
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default How to parse UDF arguments? (separators are localized)

You could check the Application.ThousandsSeparator property, if it is "."
then the UDF separator ill be ;.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Joannes Vermorel" wrote in message
...
We have designed an add-in for Excel 2003 in C# that need to parse the
arguments of an Excel UDF function (the content of the cell being
retrieved as text).

So far, we were just using an ad-hoc parser, but it fails within
localized version of Excel that do not use the comma as argument
separator.

What it the "safe" way to parse Excel function arguments? Is there any
way to know what is the separator character that should be used?

Thanks in advance,
Joannès


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default How to parse UDF arguments? (separators are localized)

Not sure why you would want to go to the trouble of parsing out and then
evaluating UDF arguments from a text string.
(I can foresee a lot of difficulties to overcome if you want to handle the
general case for anything that could be an argument).

But you can get the separator character from
Application.International(xlListSeparator)

(although I have met one case where this gave ; but Excel was actually using
, never did really get to the bottom of that we just bypassed the problem)

regards
Charles
_________________________________________
FastExcel 2.3
Name Manager 4.0
http://www.DecisionModels.com

"Joannes Vermorel" wrote in message
...
We have designed an add-in for Excel 2003 in C# that need to parse the
arguments of an Excel UDF function (the content of the cell being
retrieved as text).

So far, we were just using an ad-hoc parser, but it fails within
localized version of Excel that do not use the comma as argument
separator.

What it the "safe" way to parse Excel function arguments? Is there any
way to know what is the separator character that should be used?

Thanks in advance,
Joannès


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default How to parse UDF arguments? (separators are localized)

But you can get the separator character from
Application.International(xlListSeparator)


Thanks Charles, this looks exactly to what I was looking for.

Best regards,
Joannès
http://www.lokad.com sales forecasting
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
number formatting/separators Serene Excel Worksheet Functions 9 May 28th 07 02:03 PM
Excel functions names should be in English for all Localized versi furia Excel Worksheet Functions 0 May 16th 06 03:58 PM
Can I insert a row that has no column separators? ecodevah Excel Discussion (Misc queries) 2 January 23rd 06 04:22 PM
I need separators on the X axis of a chart. Frank Martin Charts and Charting in Excel 2 January 4th 06 12:32 AM
Writing Localized Strings In Cells Using Automation VirGin Excel Discussion (Misc queries) 0 March 7th 05 01:04 PM


All times are GMT +1. The time now is 01:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"