[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

10/06/2009 at 06:17AM PDT, ID: 24788689 | Points: 500
[x]
Attachment Details

Some Delphi --> Excel, experts here?

Asked by garrinn in Delphi Components, Delphi Curiosities

Tags: Delphi 5, Delphi, create Excel document, Excel delphi

Hi there!

Now I'm converting my data to excel doc in my own report generator. I use the method I posted with Code.

Now I want to format the cells for excel, that is, so user don't have to double click for proper width in Excel. Also it would be nice if someone know how to choose format in Excel by Delphi. The solution has to be compatible with my code, that is, I use stream and write to file.

Anyone who know how to do that?

Thanks.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
PROCEDURE XlsWriteCellLabel(XlsStream: TStream; CONST ACol, ARow: Word; CONST AValue: string);
    VAR
      L: Word;
    CONST
      {$J+}
      CXlsLabel: array[0..5] of Word = ($204, 0, 0, 0, 0, 0);
      {$J-}
  BEGIN
    L := Length(AValue);
    CXlsLabel[1] := 8 + L;
    CXlsLabel[2] := ARow;
    CXlsLabel[3] := ACol;
    CXlsLabel[5] := L;
    XlsStream.WriteBuffer (CXlsLabel, SizeOf(CXlsLabel));
    XlsStream.WriteBuffer (Pointer(AValue)^, L);
  END;
 
Keywords: Some Delphi --> Excel, experts here?
 
Loading Advertisement...
 
[+][-]10/06/09 05:17 PM, ID: 25511271

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/22/09 08:34 PM, ID: 25641191

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/22/09 08:41 PM, ID: 25641209

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74 - Hierarchy / EE_QW_3_20080625