Hi Oliver,
1. Use the funtions for file I/O.
void test_feof()
{
int count, total = 0;
char buffer[100];
FILE *stream;
// open your current using C file for read
stream = fopen( __FILE__, "r" );
if(stream == NULL )
printf( "The current C file was not opened\n" );
// Cycle until end of file reached:
while( !feof( stream ) )
{
// Attempt to read in 10 bytes:
count = fread( buffer, sizeof( char ), 100, stream );
if( ferror( stream ) )
printf("Read Error");
// Total up actual bytes read
total += count;
}
printf( "Number of bytes read = %d\n", total );
fclose( stream );
}
For more details, see Help: Programming: Origin C Language Reference: Global Functions: File I/O.
2. Use Worksheet::ImportASCII to import the data file into a worksheet. see Help: Programming: Origin C Language Reference: Classes: Internal Origin Objects: Worksheet::ImportASCII
Zachary
OriginLab Technical Services.