Geoff,
They all have a variety of dates from this current year - I've a seperate app. which also displays the data (which is originally from an Oracle Db) and this 'agrees' with the Delphi app re. dates and formatting.
Have also stepped through the Delphi app. (for a couple of hundred...
Almost there!
placed ' ' in front of the string sent to Excel and all looked fine..however, have discovered 1200 (of 33800) with date as ' 31/12/1899 00:00:00'.
Geoff, you're right in that Delphi uses the 'object' structure of Excel (as does VBA) when connecting via automation.
It's possible...
Hi All!
Have also just tried sending the dates formatted from the host app. as pure text strings, not dates, but Excel still manages to randomly transpose them ...
Regards
Steve
Hi xlbo,
I'm using Borland Delphi and linking to Excel using an automation object (ole).
Only the date data-types seem to be affected with Excel defaulting to an in-built Custom Format.
No VBA...
Regards
Steve
Dear All,
Thanks for the quick response!
Bob, a cursory check seems to indicate that dates which would be invalid if transposed are being left.
zbnet, have just tried your suggestion (dd/mmm/yyyy hh:mm:ss)and now most dates are formatted on the sheet as 'dd/mm/yy hh:mm'!!
Also and apparently...
Hi Folks!
Have come across the following "feature" in Excel regarding dates which I thought users should be aware of.
(see also faq68-5827).
If you're regional settings are not USA then take care if using a third party program to transfer date-type data into an Excel spreadsheet.
I've a sheet...
I have a similar problem transfering dates into Excel.
I've a Delphi program which retrieves data from an Oracle Db and then transfers the data to Excel.
My problem is that Excel randomly transposes month and date values whilst simultaneously dropping time values.
So my (UK date format) dates...
Me again, the idiot who posted the above!
Hope no-ones wasted any time over this as the problem was in my duff code.
Of course, I should have added 'SQL.Clear;' after the 'Close' instruction in 'With AdoQuery3 do begin'....
Please excuse my stupidity?
Regards
Steve
Hi all,
Have the following code to retrieve data from an Access db;
GetRejectTemp2SQL(RejectTemp2SQL);
with ADOQuery3 do begin
Close;
SQL.Add(RejectTemp2SQL);
Active:= True;
First;
end;
where 'RejectTemp2SQL' is a string and 'GetRejectTemp2SQL'
is...
Sorry to have bothered anyone but have figured out the fix.
Change the line;
'Struct.fFlags:= FOF_SIMPLEPROGRESS or FOF_NOERRORUI or FOF_NOCONFIRMATION;'
to read;
'Struct.fFlags:= FOF_SIMPLEPROGRESS or FOF_NOCONFIRMATION;'
Noticed when re-reading the MS API notes on SHFileOpStruct that...
Hi, All
Have the following function in my program (a procedure checks for updated data file on form creation and if found calls this function) -
function WinCopyFile(Source, Dest: string): Boolean;
var
Struct : TSHFileOpStruct;
Resultval: integer;
begin
ResultVal := 1;
try...
Hi Folks,
I have an app in D6 which uses the 'Word' components from the 'Servers' TAB to format and print reports - no probs!
Recently, I've had to increase the functionality of the app with the inclusion of output to an Excel spreadsheet.
Now, the basics (using Excel as an OLE object) work...
Hi folks,
Can anyone help by telling me how to have a TDateTimePicker component drop down programmatically ie - without any user input, for example when it gets the focus?
The Help Files insist that 'DroppedDown' can be used to set as well as get the state but - no it cann't!
Regards
Hi again,
have tried this also with FldVal declared as a type string -
FldVal:= OracleDataSet2.FieldByName('Hist_Status').AsString;
if (FldVal='Started') then
ActiveFlg:= True
else
ActiveFlg:= False;
The AV occurs as soon as the first line is actioned.
Thanks Guys,
Have changed to "FieldByName('Hist_Status').AsString" and confirmed that the fields do not contain Nulls but still get the AV.
In particular, what I don't understand is the 'write of address 0x00030f1c' message as I thought I was only reading...
So, the only other thing I can think...
Hi all,
Have the following piece of innocuous code which works fine when processing the first record then throws up access violations on the second - any ideas?
if (ODS2.FieldValues['Hist_Status']='Started') then
ActiveFlg:= True
else
ActiveFlg:= False;
If I insert a break at the...
Hi Folks
have got the following line as part of a quick and dirty program to try and clean up a Db table from an old mainframe app. -
if not(form1.ADOTable1.FieldValues['Field3'].IsNull) then..
Unfortunately, whenever it actually comes across a null field it throws up a "variant conversion...
Thanks Lucie
have copied your code to my form and it works fine!
Think I'll just have to put this one down to experience...
Strange thing is, the original works fine with MeanAndStdDev function!
Regards
Steve
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.