Solved

using OLE to access Excel, Language problem!!

Posted on 1998-12-02
1
584 Views
Last Modified: 2012-05-04
I'm using Delphi to import some stuff into Excel. (Using OLE!)

Because of the language problem (each country needs different coding) in need to check what version (language) of Excel the user has.

In word you can use the appInfo function, is there also a function i can use for Excel????

0
Comment
Question by:rick_mulder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
frazer earned 10 total points
ID: 1614768
hi,

The code you need is....

Sub AppInfo()
    Dim a
    a = Application.International(xlCountryCode)
End Sub


you can replace xlcountrycode with a variety options.....

xlCountryCode      Long      Country version of Microsoft Excel.
xlCountrySetting      Long      Current country setting in the Windows Control Panel, or the country number as determined by your Macintosh system software.
xlDecimalSeparator      String      Decimal separator.
xlThousandsSeparator      String      Zero or thousands separator.
xlListSeparator      String      List separator.
xlUpperCaseRowLetter      String      Uppercase row letter (for R1C1-style references).
xlUpperCaseColumnLetter      String      Uppercase column letter.
xlLowerCaseRowLetter      String      Lowercase row letter.
xlLowerCaseColumnLetter      String      Lowercase column letter.
xlLeftBracket      String      Character used instead of the left bracket ([) in R1C1-style relative references.
xlRightBracket      String      Character used instead of the right bracket (]) in R1C1-style references.
xlLeftBrace      String      Character used instead of the left brace ({) in array literals.
xlRightBrace      String      Character used instead of the right brace (}) in array literals.
xlColumnSeparator      String      Character used to separate columns in array literals.
xlRowSeparator      String      Character used to separate rows in array literals.
xlAlternateArraySeparator      String      Alternate array item separator to use if the current array separator is the same as the decimal separator.
xlDateSeparator      String      Date separator (/ in U.S. version).
xlTimeSeparator      String      Time separator (: in U.S. version).
xlYearCode      String      Year symbol in number formats (y in U.S. version).
xlMonthCode      String      Month symbol (m in U.S. version).
xlDayCode      String      Day symbol (d in U.S. version).
xlHourCode      String      Hour symbol (h in U.S. version).
xlMinuteCode      String      Minute symbol (m in U.S. version).
xlSecondCode      String      Second symbol (s in U.S. version).
xlCurrencyCode      String      Currency symbol ($ in U.S. version).
xlGeneralFormatName      String      Name of the General number format.
xlCurrencyDigits      Long      Number of decimal digits to use in currency formats.
xlCurrencyNegative      Long      Currency format for negative currency values:0 = ($x) or (x$)1 = -$x or -x$2 = $-x or x-$3 = $x- or x$-Note that the position of the currency symbol is determined by xlCurrencyBefore.
xlNoncurrencyDigits      Long      Number of decimal digits to use in noncurrency formats.
xlMonthNameChars      Long      Always returns three for backwards compatibility. In Microsoft Excel 97, short month names are read from Microsoft Windows and can have any length.
xlWeekdayNameChars      Long      Always returns three for backwards compatibility. In Microsoft Excel 97, short weekday names are read from Microsoft Windows and can have any length.
xlDateOrder      Long      Order of date elements:0 = month-day-year1 = day-month-year2 = year-month-day
xl24HourClock      Boolean      True if using 24-hour time, False if using 12-hour time.
xlNonEnglishFunctions      Boolean      True if not displaying functions in English.
xlMetric      Boolean      True if using the metric system, False if using the English measurement system.
xlCurrencySpaceBefore      Boolean      True if a space is added before the currency symbol.
xlCurrencyBefore      Boolean      True if the currency symbol precedes the currency values, False if it follows them.
xlCurrencyMinusSign      Boolean      True if using a minus sign for negative numbers, False if using parentheses.
xlCurrencyTrailingZeros      Boolean      True if trailing zeros are displayed for zero currency values.
xlCurrencyLeadingZeros      Boolean      True if leading zeros are displayed for zero currency values.
xlMonthLeadingZero      Boolean      True if a leading zero is displayed in months (when months are displayed as numbers).
xlDayLeadingZero      Boolean      True if a leading zero is displayed in days.
xl4DigitYears      Boolean      True if using four-digit years, False if using two-digit years.
xlMDY      Boolean      True if the date order is month-day-year for dates displayed in the long form, False if the date order is day-month-year.
xlTimeLeadingZero      Boolean      True if a leading zero is displayed in times.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question