function is both a cell and an array function. To use the array function,
select a range of cells (e.g. 5 rows and 1 column). Enter the formula
and press Ctrl+Shift+Enter.
Description: Returns the contents of a file. By default 255
characters are returned. Optionally the Length parameter can be given to return more characters (up to 32,000).
The StartPosition parameter can be given to return characters starting at a specific offset position.
If used as an array formula it returns a line in each cell. The
StartPosition parameter is interpreted as a line number.
FileContents can send up to 32768 characters to
the worksheet but only half of these will be shown visibly. Note that when
passing more than 255 characters directly into another function (nesting functions ; calling one function inside another
function) Excel will return a #Value error.
File : Full name and path of the file
StartPosition : Byte offset position from where the
filecontents should be shown. For array formulas, StartPosition is the line number from where to start.
Array examples: Select A1 to A10 Enter the following
formula and press
10 lines of the file will be shown, each in its
Copyright (C) 1995-2014 Linker IT
Software BV. All Rights Reserved. Oracle is a registered trademark of
Oracle corporation. Excel and Office are registered trademarks of
Microsoft corporation. Other names appearing on the site may be trademarks
of their respective owners. Software,
files, documents, articles and other material are provided
"as is" and without warranties as to performance or mechantability or
any other warranties whether expressed or implied. No
warranty of fitness for a particular purpose is offered.