Concatenate 2D arrays

Concatenate 2D arrays

JFileChooser jf = new JFileChooser();
jf.setMultiSelectionEnabled(true);
int returnVal = jf.showOpenDialog(frame);
File[] file = jf.getSelectedFiles();

for(int i=0;i<file.length;i++)
    {   
        System.out.println("Iteration number "+i);
        Workbook workbook;
        try {
            workbook=Workbook.getWorkbook(file[i]);
            Sheet sheet=workbook.getSheet(0);
            r=sheet.getRows();
            c=sheet.getColumns();
            for(int k=0;k<c;k++)
            {
                for(int j=0;j<r;j++)
                {
                    Cell a=sheet.getCell(k,j);  
                    arr[k][j]=a.getContents();
                    System.out.println(arr[k][j]);
                }
                System.out.println("\n");
            }  




        }
        catch (BiffException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }
        catch (IOException e2) {
            // TODO Auto-generated catch block
            e2.printStackTrace();
                        }
}
View Answers

April 18, 2012 at 3:44 PM

Ads









Related Tutorials/Questions & Answers:
Concatenate 2D arrays
Concatenate 2D arrays  JFileChooser jf = new JFileChooser(); jf.setMultiSelectionEnabled(true); int returnVal = jf.showOpenDialog(frame); File[] file = jf.getSelectedFiles(); for(int i=0;i<file.length;i
2d arrays
2d arrays  what is the code for multiplying the values in a 2d array and printing out their sum
Advertisements
How to concatenate two arrays in Java?
How to concatenate two arrays in Java?  How to concatenate two arrays in Java
java 2d arrays
java 2d arrays  Create a program that will: a) Create the array and populate it with the given values. 9, 8 2, 17 49, 4 13, 119 2, 19 11, 47.... and if i do it manualy it is wrong. public class Arrays { public static void main
arrays
arrays  using arrays in methods   Java use arrays in methods import java.util.*; class ArrayExample{ public static int getMaxValue(int[] arr){ int maxValue = arr[0]; for(int i=1;i < arr.length;i
arrays
Store a table with students and information (name, ID, password, crypted password, etc) in a multi-dimensional array "stud"  Arrays and Strings: Store a table with students and information (name, ID, password, crypted password
Arrays
Arrays   Hi I need help with the following exercises. Exercise 1: Write a Java application in which the user is prompted for the total number of integer values to be stored in an array. Initialize the array with random values
Arrays
called Rebel.java; 2.Create two arrays. One of them must store integer numbers... the numbers in the second array by 3; 7.Print out the contents of both arrays. 8.Swap
Java 2D
Java 2D  Hi, What is Java 2D? Thanks   Hi, Please see it at Java 2D API. Thanks
ModuleNotFoundError: No module named 'concatenate_files'
ModuleNotFoundError: No module named 'concatenate_files'  Hi, My... named 'concatenate_files' How to remove the ModuleNotFoundError: No module named 'concatenate_files' error? Thanks   Hi, In your
Arrays in java
Arrays in java  what is param array in java
Changing 2D graph using slider.
Changing 2D graph using slider.  Code for changing a 2d graph with help of slider
using 2D Array
using 2D Array  Write a JAVA program using 2D Array to auto-grade exams. For a class of N students, your program should read letter answers (A, B, C, D) for each student. Assume there are 5 questions in the test. Your program
using 2D Array
using 2D Array  Write a JAVA program using 2D Array to auto-grade exams. For a class of N students, your program should read letter answers (A, B, C, D) for each student. Assume there are 5 questions in the test. Your program
SQL Aggregate Concatenate
SQL Aggregate Concatenate         SQL Aggregate Concatenate provides you a concatenated record... Concatenate. To grasp this example, we create a table 'Stu_Table' using
java arrays
java arrays  can i know how can we intilize the three dimentional arrays in java? and how can we assign thae values to that array
java arrays
java arrays  i need a java program to store student details like id,name,addr,marks,average,total..using arrays..input data using scanner class and by using class, object and constructor
Java with Arrays
Java with Arrays  I was given the assignment to create two parallel arrays; both of size 50 (declares 50 as a constant) One is an array of strings... and store it in the arrays. The input for the problem should be provided in a text
arrays
Arrays
Arrays
arrays
arrays
Arrays
arrays
arrays
arrays
Arrays
arrays
arrays
arrays

Ads