You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add append object method so values can be imported correctly instead of all data importing as strings (#46)
* add append object method so values can be imported correctly instead of just all being strings
* Adding method documentation for the new method created
---------
Co-authored-by: SteveWinward <[email protected]>
Copy file name to clipboardExpand all lines: src/GoogleSheetsWrapper/SheetAppender.cs
+119Lines changed: 119 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,4 @@
1
+
usingSystem;
1
2
usingSystem.Collections.Generic;
2
3
usingSystem.Globalization;
3
4
usingSystem.IO;
@@ -157,6 +158,76 @@ public void AppendCsv(Stream stream, CsvConfiguration csvConfig, int batchWaitTi
157
158
}
158
159
}
159
160
161
+
/// <summary>
162
+
/// This lets you append a list of objects to the Google Sheet with any object using reflection to determine the property types during runtime.
163
+
/// </summary>
164
+
/// <typeparam name="T"></typeparam>
165
+
/// <param name="dataRecords">The list of records</param>
166
+
/// <param name="batchWaitTime">See https://developers.google.com/sheets/api/limits at last check is 60 requests a minute, so 1 second delay per request should avoid limiting</param>
167
+
/// <param name="batchSize">Increasing batch size may improve throughput. Default is conservative.</param>
168
+
/// <param name="skipWritingHeaderRow">This boolean indicates if you want to actually write the header row to the Google sheet</param>
0 commit comments