Click here to Skip to main content
16,004,927 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Child Dialog scrollbars Pin
Hamid_RT1-May-06 18:24
Hamid_RT1-May-06 18:24 
GeneralRe: Child Dialog scrollbars Pin
Tarek Jabri1-May-06 18:39
Tarek Jabri1-May-06 18:39 
Questionhow to save the value/string of CFlexgrid cells as a file onto hard disk? Pin
zeus_master1-May-06 16:56
zeus_master1-May-06 16:56 
AnswerRe: how to save the value/string of CFlexgrid cells as a file onto hard disk? Pin
Nibu babu thomas1-May-06 19:16
Nibu babu thomas1-May-06 19:16 
GeneralRe: how to save the value/string of CFlexgrid cells as a file onto hard disk? Pin
zeus_master1-May-06 21:01
zeus_master1-May-06 21:01 
GeneralRe: how to save the value/string of CFlexgrid cells as a file onto hard disk? Pin
Nibu babu thomas1-May-06 21:06
Nibu babu thomas1-May-06 21:06 
GeneralRe: how to save the value/string of CFlexgrid cells as a file onto hard disk? Pin
venadder2-May-06 6:26
venadder2-May-06 6:26 
GeneralRe: how to save the value/string of CFlexgrid cells as a file onto hard disk? Pin
venadder2-May-06 6:29
venadder2-May-06 6:29 
Check the SaveGrid method for FlexGrid,here is a quick look:
SaveGrid Method

Saves grid contents and format to a file.

Syntax

[form!]VSFlexGrid.SaveGrid FileName As String, SaveWhat As SaveLoadSettings, [ FixedCells As Boolean ]

Remarks

This method saves a grid to a binary or to a text file. The grid may be retrieved later with the LoadGrid method. Grids saved to text files may also be read by other programs, such as Microsoft Excel or Microsoft Word.

The parameters for the SaveGrid method are described below:

FileName As String

The name of the file to create, including the path. If a file with the same name already exists, it is overwritten.

SaveWhat As SaveLoadSettings

This parameter specifies what should be saved. Valid options are:



Constant
Value
Description

flexFileAll
0
Save all data and formatting information.

flexFileData
1
Save only the data, ignoring formatting information.

flexFileFormat
2
Save only the global formatting, ignoring the data.

flexFileCommaText
3
Save data to a comma-delimited text file.

flexFileTabText
4
Save data to a tab-delimited text file.

flexFileCustomText
5
Save data to a text file using the delimiters specified by the ClipSeparators property.

flexFileExcel
6
Save all data and formatting information to an Excel97 file. This filter does not support frozen color rows or columns.




Options As Variant (optional)

When saving and loading text files, this parameter allows you to specify whether fixed cells are saved and restored. The default is False, which means fixed cells are not saved or restored.

When saving and loading Excel files, this parameter allows you to specify the name or index of the sheet to be loaded, or the name of the sheet to be saved. If omitted, the first sheet is loaded.

The options for saving fixed rows, columns, and translated combo values include:



Constant
Value
Description

flexXLSaveFixedCells
3
Saves fixed cells.

flexXLSaveFixedRows
2
Saves fixed rows.

flexXLSaveFixedCols
1
Saves fixed columns.

flexXLSaveRaw
4
Saves raw (untranslated) data.




For example, the options can be written as:

fg.SaveGrid "book1.xls", flexFileExcel

fg.SaveGrid "book1.xls", flexFileExcel, "sheetName"

fg.SaveGrid "book1.xls", flexFileExcel, flexXLSaveFixedCells

fg.SaveGrid "book1.xls", flexFileExcel, flexXLSaveFixedRows

fg.SaveGrid "book1.xls", flexFileExcel, flexXLSaveFixedCols

fg.SaveGrid "book1.xls", flexFileExcel, flexXLSaveRaw

fg.SaveGrid "book1.xls", flexFileExcel, _
flexXLSaveFixedCells Or flexXLSaveRaw

Notes


Questiondialog button disabled !!!! Pin
venadder1-May-06 15:05
venadder1-May-06 15:05 
AnswerRe: dialog button disabled !!!! Pin
Nibu babu thomas1-May-06 17:58
Nibu babu thomas1-May-06 17:58 
GeneralRe: dialog button disabled !!!! Pin
venadder2-May-06 6:24
venadder2-May-06 6:24 
GeneralRe: dialog button disabled !!!! Pin
Hamid_RT2-May-06 19:19
Hamid_RT2-May-06 19:19 
GeneralRe: dialog button disabled !!!! Pin
Nibu babu thomas2-May-06 21:11
Nibu babu thomas2-May-06 21:11 
GeneralRe: dialog button disabled !!!! Pin
venadder3-May-06 4:45
venadder3-May-06 4:45 
GeneralRe: dialog button disabled !!!! Pin
Nibu babu thomas3-May-06 17:17
Nibu babu thomas3-May-06 17:17 
QuestionMute my application only.... not others running (windowxs xp...) Pin
chasetoys1-May-06 13:39
chasetoys1-May-06 13:39 
AnswerRe: Mute my application only.... not others running (windowxs xp...) Pin
Ryan Binns1-May-06 14:05
Ryan Binns1-May-06 14:05 
GeneralRe: Mute my application only.... not others running (windowxs xp...) Pin
Maxwell Chen1-May-06 18:21
Maxwell Chen1-May-06 18:21 
GeneralRe: Mute my application only.... not others running (windowxs xp...) Pin
Ryan Binns1-May-06 21:06
Ryan Binns1-May-06 21:06 
AnswerRe: Mute my application only.... not others running (windowxs xp...) Pin
Andrew Bleakley1-May-06 14:46
Andrew Bleakley1-May-06 14:46 
QuestionCWnd.RegEnumValue(HKEY...) Pin
oldmirco1-May-06 12:00
oldmirco1-May-06 12:00 
AnswerRe: CWnd.RegEnumValue(HKEY...) Pin
Ryan Binns1-May-06 14:06
Ryan Binns1-May-06 14:06 
AnswerRe: CWnd.RegEnumValue(HKEY...) Pin
Hamid_RT1-May-06 18:21
Hamid_RT1-May-06 18:21 
GeneralRe: CWnd.RegEnumValue(HKEY...) Pin
oldmirco2-May-06 15:47
oldmirco2-May-06 15:47 
GeneralRe: CWnd.RegEnumValue(HKEY...) Pin
Hamid_RT2-May-06 19:16
Hamid_RT2-May-06 19:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.