クラスをCSVにエクスポートするための多くの解決策を見つけましたが、私の問題は次のとおりです。
エクスポートしようとしているクラスには、observablecollection であるプロパティがあります。例えば:
public class ShipmentForExport
{
public string WaybillNumber { get; set; }
public DateTime WaybillDate { get; set; }
public string CustomerName { get; set; }
public string CustomerCode { get; set; }
public string CollectingBranchName { get; set; }
public string CollectingBranchCode { get; set; }
public string RecipientName { get; set; }
public string RecipientPhoneNumber { get; set; }
public string RecipientCellphoneNumber { get; set; }
public string RecipientCompany { get; set; }
public string DestinationAddress1 { get; set; }
public string DestinationAddress2 { get; set; }
public string DestinationCity { get; set; }
public string DestinationSuburb { get; set; }
public string DestinationProvince { get; set; }
public string DestinationCountry { get; set; }
public string DestinationPostalCode { get; set; }
***public ObservableCollection<InHouseParcel> Parcels { get; set; }***
}
出荷のリストをcsvにエクスポートしようとすると機能しますが、明らかに小包は希望どおりにエクスポートされません。
Filehelpers Library と csvHelper も使用してみました。
どんな助けでも大歓迎です!!