Пример #1
0
        private void subMenuHerramientasAbrirUbicacionExcel(object sender, RoutedEventArgs e)
        {
            Auxiliar48 aux  = new Auxiliar48();
            string     ruta = aux.rutaExcelTabla();


            Process.Start("explorer.exe", ruta);
        }
Пример #2
0
        private void buttonExportar_Click(object sender, EventArgs e)
        {
            string nombrefichero = textBoxnombrefichero.Text;
            var    isValid       = !string.IsNullOrEmpty(nombrefichero) &&
                                   nombrefichero.IndexOfAny(Path.GetInvalidFileNameChars()) < 0;
            var tieneEspacios = nombrefichero.IndexOf(' ') >= 0;

            if (!isValid || tieneEspacios)
            {
                MessageBox.Show("El nombre del ficherono puede tener espacios en blanco, ni contener caracteres especiales");
            }
            else
            {
                //Se guarda el excel con los datos
                Auxiliar48 main2 = new Auxiliar48();
                main2.exportarExcel(tablafinal, nombrefichero);
            }
        }
Пример #3
0
        private void buttonExportar_Click(object sender, RoutedEventArgs e)
        {
            string nombrefichero = textBoxnombrefichero.Text;
            var    isValid       = !string.IsNullOrEmpty(nombrefichero) &&
                                   nombrefichero.IndexOfAny(System.IO.Path.GetInvalidFileNameChars()) < 0;
            var tieneEspacios = nombrefichero.IndexOf(' ') >= 0;

            if (!isValid || tieneEspacios)
            {
                System.Windows.Forms.MessageBox.Show("El nombre del ficherono puede tener espacios en blanco, ni contener caracteres especiales");
            }
            else
            {
                //Para mostrar el cursos girando
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
                //Se guarda el excel con los datos
                Auxiliar48 aux = new Auxiliar48();
                aux.exportarExcel(tablafinal, nombrefichero);

                //Cursor por defecto
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
            }
        }