English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

[Visual Basic.NET]

Can someone please help me about how to read multiple .doc files, say 40 word files into an array of String

2007-02-14 07:33:52 · 3 answers · asked by The Elite One 1 in Computers & Internet Programming & Design

3 answers

You'll want all the .doc files in a single directory with no other files in it.

You would open a path to that directory then run a FOR / NEXT loop to open each .doc, read it into your array and close it

2007-02-14 07:47:16 · answer #1 · answered by rod 6 · 0 0

Do you just want to read the filenames of the files into an array or actually get the file contents? If the latter, I wouldn't recommend it. Word's .DOC file format is not a text format (unless you save it as XML).

2007-02-14 09:39:08 · answer #2 · answered by Gene 3 · 0 0

You need to index the arrays: if(i%2 !=0){ arrayState[i] = inputFile.nextLine(); } else { arrayCapital[i] = inputFile.nextLine(); }

2016-05-23 23:11:31 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers