There are several types of hidden data in Microsoft Excel documents, each of which has a corresponding flag in the KV_CONFIG_Arg structure, which you can toggle to determine whether the hidden data is shown.
The following table lists each data type, its default behavior, and its corresponding configuration API flag.
To toggle the display of any type of hidden data
Define the configurable argument variable to use in the KV_CONFIG_Arg structure. For example:
KV_CONFIG_Arg setArg = {0}
Set the KV_ALL_OVERWRITECONFIGFILE
flag to overwrite the configuration file settings. For example:
setArg.keyID = KV_ALLFLAGS; setArg.keyType = KV_INT32ARG; setArg.keyData.intArg = KV_ALL_OVERWRITECONFIGFILE;
To re-enable configuration file settings later, set !KV_ALL_OVERWRITECONFIGFILE
.
Assign values to the members of the variable. For example:
setArg.keyID = KV_SSFLAGS; setArg.keyType = KV_INT32ARG; setArg.keyData.intArg = KV_SS_SHOWHIDDENINFOR;
Call fpFilterConfig() with the following arguments to set the variable:
Argument | Parameter |
---|---|
nType
|
KVFLT_SetConfigurableArguments
|
nValue
|
TRUE
|
pData
|
The variable defined in step 1. |
For example:
(*fpFilterConfig)(pKVFilter, KVFLT_SetConfigurableArguments, TRUE, &setArg)
The following example overwrites the configuration file settings and enables filtering of formulas.
KV_CONFIG_Arg setArg = {0}; setArg.keyID = KV_ALLFLAGS; setArg.keyType = KV_INT32ARG; setArg.keyData.intArg = KV_ALL_OVERWRITECONFIGFILE; fpKV_FilterConfig(pFilter, KVFLT_SetConfigurableArguments, TRUE, &setArg); setArg.keyID = KV_SSFLAGS; setArg.keyType = KV_INT32ARG; setArg.keyData.intArg = KV_SS_SHOWFORMULAS; fpKV_FilterConfig(pFilter, KVFLT_SetConfigurableArguments, TRUE, &setArg);
You can control Microsoft Excel hidden data settings through parameters in the formats.ini
file.
To toggle hidden Excel data settings in the formats.ini file
formats.ini
file in a text editor.Under [Options]
, set one or both of the following parameters.
gethiddeninfo
to 1
. See Filter Hidden Text in Microsoft Excel Files for more information.getformulastring
to the appropriate value. See Extract Microsoft Excel Formulas for more information.
|