Question: public void copyPaste(int sourceIndex, int startRowSource, int startColumnSource, int endRowSource, int endColumnSource, int destIndex, int startRowDest, int startColumnDest) { if(sourceIndex <0 || sourceindex>=sheets.size()) { return;

public void copyPaste(int sourceIndex, int startRowSource, int startColumnSource, int endRowSource, int endColumnSource, int destIndex, int startRowDest, int startColumnDest)

{

if(sourceIndex <0 || sourceindex>=sheets.size())

{

return;

}

if(destIndex <0 || destindex>=sheets.size())

{

return;

}

Worksheet sheetSource = sheets.get(sourceIndex);

Worksheet sheetDestination = sheets.get(destIndex);

ArrayList dataPoints = sheetSource.getData();

ArrayList dataDestination = sheetDestination.getData();

for(DataEntry eachDataEntry : dataPoints)

{

if(eachDataEntry.inRange(startRowSource, startColumnSource, endRowSource, endColumnSource))

{

double value = eachDataEntry.getValue();

dataDestination.add(new DataEntry(startRowDest, startColumnDest, value));

startColumnDest++;

}

}

}

need help fixing this..

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!