Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Базы";
Текущий архив: 2002.05.30;
Скачать: [xml.tar.bz2];

Вниз

DBGrid -> SYLK   Найти похожие ветки 

 
altukhov_denis   (2002-05-01 08:30) [0]

Мастера помогите, надо данные из DBGrid оформлять в файл с SYLK форматом, либо передача данных в Excel ,без использования DDE компонентов. Буду благодарен за кусочек кода


 
Oleg_er   (2002-05-01 08:38) [1]

что насчет кода, то см ниже, а так загляни в тему что-то типа "Пропадаю, ребятушки" дня 3 назад обсуждалась...

var
Excel:OLEVariant;
begin
Excel:=CreateOleObject("Excel.Application");
Excel.Visible:=True;
Excel.Workbooks.Add;
while not DBGrid.DataSource.DataSet.Eof do
begin
Excel.ActiveSheet.Cells[i,j].value:=vtb_ras_ar.DataSource.DataSet.fieldByName("field1").asFloat;
vtb_ras_ar.DataSource.DataSet.next;
end;

excel.Workbooks.close;
excel.quit;
end;


 
Oleg_er   (2002-05-01 08:46) [2]

сорьки, вместо vtb_ras_ar -> DBGrid


 
altukhov_denis   (2002-05-01 12:34) [3]

А насчёт оформления в SYLK формат кто нить знет.
Если можно с кодом.


 
KSergey   (2002-05-01 12:44) [4]

Что есть SYLK? (для меня темного)
Если необходимо - могу кинуть свой модуль для конвертрования в MS Excell любого DBGrid.
Впрочем, подобных модулей по инету немеряно


 
altukhov_denis   (2002-05-01 14:09) [5]

SYLK это формат файла , вот что я по нему нашел в сети:

GFF Format Summary: Microsoft SYLKMicrosoft SYLK
Also Known As: Symbolic Link Format, SLK

TypeVector
ColorsNA
CompressionNA
Maximum Image SizeNA
Multiple Images Per FileNo
Numerical FormatNA
OriginatorMicrosoft Corporation
PlatformMS-DOS, others
Supporting ApplicationsSpreadsheets, business graphics applications
See AlsoLotus DIF

Usage
Interchange of spreadsheet information.
Comments
Yet another format used to share spreadsheet information with business graphics
applications.

The Microsoft SYLK (Symbolic Link) format is used mainly for the interchange of
spreadsheet data between applications such as Microsoft Multiplan and Excel.
Files in this format might also be imported directly by business graphics
applications. SYLK files are written entirely in ASCII and, like Lotus DIF and
SDI, are application-independent. SYLK, however, incorporates several features
not found in other spreadsheet data interchange formats.
Contents:
File Organization
File Details
For Further Information

File Organization
Records in a SYLK file contain three fields: a Record Type Descriptor (RTD), a
Field Type Descriptor (FTD), and a variable amount of data. A SYLK record has
the following format:
<RTD>;<FTD>;<data> ...

File Details
The following Record Type Descriptors (RTDs) are currently defined by SYLK:
RTDDescription
BCell boundary
CA data cell
EEnd of file
FCell formatting parameter
IDSYLK file identification record
NELink to an inactive spreadsheet file
NNName given to a rectangluar area of cells
NUSubstitute filename
PTime and date stamp formats

Each Record Type Decriptor may be followed by a single Field Type Descriptor
(FTD) if needed. Most field type descriptors have meanings unique to each
record, but a few, listed below, have meanings global to all record types:
FTDDescription
WColumn width
XHorizontal cell coordinate
YVertical cell coordinate

The SYLK file format does not contain a header and resembles a data stream in
its design. Except for the ID record, which must be the first record in every
SYLK file, RTDs may appear anywhere in the file with the following exceptions:
The first record must be an ID record (the RTD is ID)
All P records follow the ID record.
All B records follow the P records.
A ;D or ;G FTD must appear in a C record prior to a reference to that FTD by
another record.
NE records always follow NU records.
The final record must be an E record.
For Further Information
SYLK was created and is maintained by Microsoft Corporation. You may be able to
get information by contacting:
Microsoft Corporation
One Microsoft Way
Redmond, WA 98052-6399
Voice: 206-882-8080
Voice: 800-426-9400
FAX: 206-883-8101
WWW: http://www.microsoft.com/
The following reference also contains information about the SYLK format:
Walden, Jeffrey B. File Formats for Popular PC Software, John Wiley & Sons,
New York, NY, 1986.
You may also be able to get information via FTP through the Developer Relations
Group at:
ftp://ftp.microsoft.com/developer/drg/

И необходимо по такому стандарту формировать файл, как у меня
уже мыслей нет. Кто сможет подскажите





 
lat   (2002-05-07 12:59) [6]

В EXEL создай или открой готовый файл *.xls и сохрани его как *.slk;
И теперь можешь разбираться в нем с помощью текстового редактора



Страницы: 1 вся ветка

Форум: "Базы";
Текущий архив: 2002.05.30;
Скачать: [xml.tar.bz2];

Наверх




Память: 0.46 MB
Время: 0.004 c
1-97217
ga3
2002-05-18 03:19
2002.05.30
Word&Delphi


7-97444
sdan
2002-03-04 18:05
2002.05.30
Keyboard


1-97324
agrig
2002-05-19 18:27
2002.05.30
Какой ModalResult при закрытии по Alt+F4 или кнопке с крестом?


3-97175
Fellomena
2002-05-07 16:12
2002.05.30
Установка пароля на файлы Парадокса программно (inside).


1-97348
Kre_yurik
2002-05-20 13:17
2002.05.30
Текстовые файлы





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский