 					if (headerDepth == 1)
 					{
 						// fields is an Array of Strings
-						row[c] = record[fields[c]];
+						row[c] = record[fields[c]] || '';
 					}
 					else
 					{

				for (c = 0; c < fields.length; c++)
				{
					if (headerDepth > 1)
						row[c] = fields[c][r]; // fields are Arrays
					else
						row[c] = fields[c]; // fields are Strings
				}
				rows[r] = row;
			}

						for each (var field:String in fieldChain)
							if (cell)
								cell = cell[field];
						row[c] = cell || '';
					}
				}
				rows[headerDepth + r] = row;
