フィルタ アウトされた行の交互行の設定がExcelファイルにエクスポートされない
対象製品
SPREAD for WPF 1.0J
状況
修正済み
詳細
フィルタリングにより非表示にした行の交互行の設定がExcelファイルにエクスポートされません。
【手順】
1.新規ウィンドウにSPREADとButtonを配置します
2.下記サンプルコードをコピーします
3.Buttonをクリックします
--フィルタされた行がエクスポートされたExcelファイルで非表示になりません
【サンプルコード】
Private Sub MainWindow_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
' テストデータの設定
GcSpreadGrid1.Cells(0, 0).Value = "North"
GcSpreadGrid1.Cells(1, 0).Value = "South"
GcSpreadGrid1.Cells(2, 0).Value = "East"
GcSpreadGrid1.Cells(3, 0).Value = "South"
GcSpreadGrid1.Cells(4, 0).Value = "North"
GcSpreadGrid1.Cells(5, 0).Value = "North"
GcSpreadGrid1.Cells(6, 0).Value = "West"
GcSpreadGrid1.Columns(0).Width = 80
' フィルタリングの設定
GcSpreadGrid1.Columns(0).CanUserFilter = True
Dim filterDes As GrapeCity.Windows.SpreadGrid.SpreadFilterDescription = New GrapeCity.Windows.SpreadGrid.SpreadFilterDescription()
filterDes.ColumnIndex = 0
Dim includeListCondition1 As GrapeCity.Windows.SpreadGrid.IncludeListCondition = New GrapeCity.Windows.SpreadGrid.IncludeListCondition(New String() {"North"})
filterDes.Conditions.Add(includeListCondition1)
GcSpreadGrid1.FilterDescriptions.Add(filterDes)
' 1行おきの背景色の設定
GcSpreadGrid1.AlternatingRows.Add(New GrapeCity.Windows.SpreadGrid.AlternatingRow() With {.Background = New SolidColorBrush(Colors.AliceBlue)})
GcSpreadGrid1.AlternatingRows.Add(New GrapeCity.Windows.SpreadGrid.AlternatingRow() With {.Background = New SolidColorBrush(Colors.AntiqueWhite)})
End Sub
Private Sub Button1_Click(sender As Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
GcSpreadGrid1.SaveExcel("C:¥Temp¥text.xls")
End Sub
【手順】
1.新規ウィンドウにSPREADとButtonを配置します
2.下記サンプルコードをコピーします
3.Buttonをクリックします
--フィルタされた行がエクスポートされたExcelファイルで非表示になりません
【サンプルコード】
Private Sub MainWindow_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
' テストデータの設定
GcSpreadGrid1.Cells(0, 0).Value = "North"
GcSpreadGrid1.Cells(1, 0).Value = "South"
GcSpreadGrid1.Cells(2, 0).Value = "East"
GcSpreadGrid1.Cells(3, 0).Value = "South"
GcSpreadGrid1.Cells(4, 0).Value = "North"
GcSpreadGrid1.Cells(5, 0).Value = "North"
GcSpreadGrid1.Cells(6, 0).Value = "West"
GcSpreadGrid1.Columns(0).Width = 80
' フィルタリングの設定
GcSpreadGrid1.Columns(0).CanUserFilter = True
Dim filterDes As GrapeCity.Windows.SpreadGrid.SpreadFilterDescription = New GrapeCity.Windows.SpreadGrid.SpreadFilterDescription()
filterDes.ColumnIndex = 0
Dim includeListCondition1 As GrapeCity.Windows.SpreadGrid.IncludeListCondition = New GrapeCity.Windows.SpreadGrid.IncludeListCondition(New String() {"North"})
filterDes.Conditions.Add(includeListCondition1)
GcSpreadGrid1.FilterDescriptions.Add(filterDes)
' 1行おきの背景色の設定
GcSpreadGrid1.AlternatingRows.Add(New GrapeCity.Windows.SpreadGrid.AlternatingRow() With {.Background = New SolidColorBrush(Colors.AliceBlue)})
GcSpreadGrid1.AlternatingRows.Add(New GrapeCity.Windows.SpreadGrid.AlternatingRow() With {.Background = New SolidColorBrush(Colors.AntiqueWhite)})
End Sub
Private Sub Button1_Click(sender As Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
GcSpreadGrid1.SaveExcel("C:¥Temp¥text.xls")
End Sub
回避方法
Service Pack 2(v1.0.2015.1109)で修正済み。
Service Pack 2(v1.0.2015.1109)より前のバージョンでは次の回避方法が有効です。
------------------------------------------
フィルタリングのクリアしてExcelファイルにエクスポートします。
【サンプルコード】
Private Sub Button1_Click(sender As Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
GcSpreadGrid1.Save("C:¥Temp¥text.sgxml")
Dim temp As New GrapeCity.Windows.SpreadGrid.GcSpreadGrid()
temp.Open("C:¥Temp¥text.sgxml")
' フィルタリングのクリア
temp.FilterDescriptions.Clear()
temp.SaveExcel("C:¥Temp¥text.xls")
End Sub
Service Pack 2(v1.0.2015.1109)より前のバージョンでは次の回避方法が有効です。
------------------------------------------
フィルタリングのクリアしてExcelファイルにエクスポートします。
【サンプルコード】
Private Sub Button1_Click(sender As Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
GcSpreadGrid1.Save("C:¥Temp¥text.sgxml")
Dim temp As New GrapeCity.Windows.SpreadGrid.GcSpreadGrid()
temp.Open("C:¥Temp¥text.sgxml")
' フィルタリングのクリア
temp.FilterDescriptions.Clear()
temp.SaveExcel("C:¥Temp¥text.xls")
End Sub