I'm trying to export the Stylesheet table.
The blob field probably contains the image of the word or excel template.
The Blob contains the Stylesheet (.xslt), which transforms an XML-representation of the Form's controls into an XML-representation of the office document. You can export it from the GUI.
In case you're looking for the logo image, it's in the stylesheet in a base64 encoded string.
I found a dataport sample online.
It basically exports the Blob field separately into a file. So, for 5 records you have 5 files.
Data looks like:
StyleSheet - OnPreDataItem()
//Setup file path for BLOB files
FilePath := CurrDataport.FILENAME;
IF STRPOS(FilePath,'\') = 0 THEN
FilePath := ''
ELSE
REPEAT
IF COPYSTR(FilePath,STRLEN(FilePath),1) <> '\' THEN
FilePath := COPYSTR(FilePath,1,STRLEN(FilePath)-1);
UNTIL COPYSTR(FilePath,STRLEN(FilePath),1) = '\';
StyleSheet - OnBeforeExportRecord()
StyleSheet - OnAfterExportRecord()
//Export blobs as bmp files
CALCFIELDS("Style Sheet");
IF "Style Sheet".HASVALUE THEN BEGIN
StyleSheetFileName := FilePath + '_' + FORMAT("Style Sheet ID");
"Style Sheet".EXPORT(StyleSheetFileName,FALSE);
END;
StyleSheet - OnBeforeImportRecord()
StyleSheet - OnAfterImportRecord()
//Import blobs from bmp files
IF StyleSheetRec2.GET("Style Sheet ID") THEN BEGIN
CALCFIELDS("Style Sheet");
IF "Style Sheet".HASVALUE THEN
CLEAR("Style Sheet");
END;
StyleSheetFileName := FilePath + '_' + FORMAT("Style Sheet ID");
IF StyleSheetFile.OPEN(StyleSheetFileName) THEN BEGIN
StyleSheetFile.CLOSE;
"Style Sheet".IMPORT(StyleSheetFileName,FALSE);
END ELSE
CLEAR("Style Sheet");
Comments
What's stored in your blob field...Pic or text?
http://msdn.microsoft.com/en-us/library/dd338648.aspx
http://www.BiloBeauty.com
http://www.autismspeaks.org
The blob field probably contains the image of the word or excel template.
The Blob contains the Stylesheet (.xslt), which transforms an XML-representation of the Form's controls into an XML-representation of the office document. You can export it from the GUI.
In case you're looking for the logo image, it's in the stylesheet in a base64 encoded string.
It basically exports the Blob field separately into a file. So, for 5 records you have 5 files.
Data looks like:
StyleSheet - OnPreDataItem()
//Setup file path for BLOB files
FilePath := CurrDataport.FILENAME;
IF STRPOS(FilePath,'\') = 0 THEN
FilePath := ''
ELSE
REPEAT
IF COPYSTR(FilePath,STRLEN(FilePath),1) <> '\' THEN
FilePath := COPYSTR(FilePath,1,STRLEN(FilePath)-1);
UNTIL COPYSTR(FilePath,STRLEN(FilePath),1) = '\';
StyleSheet - OnBeforeExportRecord()
StyleSheet - OnAfterExportRecord()
//Export blobs as bmp files
CALCFIELDS("Style Sheet");
IF "Style Sheet".HASVALUE THEN BEGIN
StyleSheetFileName := FilePath + '_' + FORMAT("Style Sheet ID");
"Style Sheet".EXPORT(StyleSheetFileName,FALSE);
END;
StyleSheet - OnBeforeImportRecord()
StyleSheet - OnAfterImportRecord()
//Import blobs from bmp files
IF StyleSheetRec2.GET("Style Sheet ID") THEN BEGIN
CALCFIELDS("Style Sheet");
IF "Style Sheet".HASVALUE THEN
CLEAR("Style Sheet");
END;
StyleSheetFileName := FilePath + '_' + FORMAT("Style Sheet ID");
IF StyleSheetFile.OPEN(StyleSheetFileName) THEN BEGIN
StyleSheetFile.CLOSE;
"Style Sheet".IMPORT(StyleSheetFileName,FALSE);
END ELSE
CLEAR("Style Sheet");
StyleSheet - OnPostDataItem()