We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to copy a row to a different worksheet. I can't find an easy way of doing it. Is what I've written here the best way?
` $row = @(Get-CellValue -worksheet $Worksheet -Coordinates "A2:J2")
$DifferentWorksheet.SetValue($lastrow,1, $row.'#')
$DifferentWorksheet.SetValue($lastrow,2, $row.Action)
$DifferentWorksheet.SetValue($lastrow,3, $row.Project)
$DifferentWorksheet.SetValue($lastrow,4, $row.Context)
$DifferentWorksheet.SetValue($lastrow,5, $row.Area)
$DifferentWorksheet.SetValue($lastrow,6, $row.Time)
$DifferentWorksheet.SetValue($lastrow,7, $row.Due)
$DifferentWorksheet.SetValue($lastrow,8, $row.NA)
$DifferentWorksheet.SetValue($lastrow,9, $row.Created)
$DifferentWorksheet.SetValue($lastrow,10, $row.Finished)
$excel.save()`
The text was updated successfully, but these errors were encountered:
Figured it out. Sorry didn't realise to look at EPPlus docs
$WorkSheet.Cells["A2:J2"].Copy($DifferentWorkSheet.Cells["A2:J2"])
Sorry, something went wrong.
Good find! Thanks for sharing! Yeah, PSExcel is somewhat limited in terms of working with existing data, the EPPlus library is always a good bet
Cheers!
No branches or pull requests
I'm trying to copy a row to a different worksheet. I can't find an easy way of doing it. Is what I've written here the best way?
` $row = @(Get-CellValue -worksheet $Worksheet -Coordinates "A2:J2")
$DifferentWorksheet.SetValue($lastrow,1, $row.'#')
$DifferentWorksheet.SetValue($lastrow,2, $row.Action)
$DifferentWorksheet.SetValue($lastrow,3, $row.Project)
$DifferentWorksheet.SetValue($lastrow,4, $row.Context)
$DifferentWorksheet.SetValue($lastrow,5, $row.Area)
$DifferentWorksheet.SetValue($lastrow,6, $row.Time)
$DifferentWorksheet.SetValue($lastrow,7, $row.Due)
$DifferentWorksheet.SetValue($lastrow,8, $row.NA)
$DifferentWorksheet.SetValue($lastrow,9, $row.Created)
$DifferentWorksheet.SetValue($lastrow,10, $row.Finished)
$excel.save()`
The text was updated successfully, but these errors were encountered: