use of org.teiid.translator.google.api.metadata.Worksheet in project teiid by teiid.
the class AbstractSpreadsheetExecution method checkHeaders.
void checkHeaders(String worksheetTitle) throws TranslatorException {
SpreadsheetInfo info = connection.getSpreadsheetInfo();
Worksheet worksheet = info.getWorksheetByName(worksheetTitle);
if (worksheet == null) {
// $NON-NLS-1$
throw new SpreadsheetOperationException(SpreadsheetExecutionFactory.UTIL.gs("missing_worksheet", worksheetTitle));
}
if (!worksheet.isHeaderEnabled()) {
// $NON-NLS-1$
throw new TranslatorException(SpreadsheetExecutionFactory.UTIL.gs("headers_required"));
}
}
Aggregations